lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Vadim Gindin <vgin...@detectum.com>
Subject CustomQuery.bulkScorer isn't called from BooleanQuery with filter block
Date Wed, 25 Jul 2018 12:43:13 GMT
Hi all!

I have the following BooleanQuery (JSON representation as it is defined in
Elasticsearch):

{
  "query" : {
    "bool" : {
      "must" : {
        "custom_query" : {      // has own bulkScorer() implementation
             ...
         }
      },
      "filter" : {
             ...
      }
    }
  }
}

Here "custom_query" is a custom query I defined with custom Weight and
custom bulkScorer() method.

1. This method isn't called if BooleanQuery contains Filter clause near
CustomQuery.
2. This method is called if BooleanQuery contains only one clause with
CustomQuery.

Why? I need my CustomQuery.CustomWieght.bulkScorer() working.

P.S. As I understand 2 clauses are "required" clauses. CustomQuery having
bulkScorer() doesn't know about Filter, and Filter doesn't know about
CustomQuery, but it seems they should work together. And that is why
bulkScorer isn't called.

Is there a way to integrate CustomQuery.bulkScorer() with possible adjacent
filters?

Regards,
Vadim Gindin

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message