lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Vadim Gindin <vgin...@detectum.com>
Subject Re: CustomQuery.bulkScorer isn't called from BooleanQuery with filter block
Date Thu, 26 Jul 2018 18:03:20 GMT
Hello Adrien.

No, My query supports both scorer() and bulkScorer(). Sorry, I didn't
specified that, because I thought it is not related to my difficulty.

Could you explain what did you mean by " Today, conjunctions never use the
bulkScorer API."?

Thanks.

On Thu, Jul 26, 2018 at 1:11 AM Adrien Grand <jpountz@gmail.com> wrote:

> 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 <vgindin@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
> >
>

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