Hello Vadim, It looks like your query only supports bulkScorer() and not scorer()? Unfortunately this is illegal: queries must implement scorer(). Today, conjunctions never use the bulkScorer API.
Le mer. 25 juil. 2018 à 18:47, Vadim Gindin <vgin...@detectum.com> a écrit : > 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 >