[ 
https://issues.apache.org/jira/browse/LUCENE-7957?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16154184#comment-16154184
 ] 

Michael McCandless commented on LUCENE-7957:
--------------------------------------------

Thanks [~jpountz], I agree the API is problematic and spotty at best.

bq.  I think it would be a pity that an improvement to query execution be seen 
as a regression because it makes it harder to identify a matching clause.

I think this API should always be "best effort", no guarantees, etc., and so if 
ever we see an improvement to query execution, we should still do it, even if 
it breaks this API.

bq. and once from a FilterScorer so that the score can be customized depending 
on whether a particular query matches.

The challenge for me is that I'm using a large expression, and 
{{keyword_only_match}} is just one such variable, consulted multiple times in a 
big machine learned decision tree; it's not clear how I could invert that model 
to use a {{FilterScorer}} instead.  Maybe I'll just fall back to running N 
queries, one for each "clause" I need to identify.  This is already likely in a 
"rescore top N" context, so the amount of memory would be contained ...

bq. To me it's also interesting that it is the first time this bug is reported 
even though it has existed for almost two entire major versions (since 5.1) and 
affects one of our main scorers.

Yeah, true.



> ConjunctionScorer.getChildren does not return all children
> ----------------------------------------------------------
>
>                 Key: LUCENE-7957
>                 URL: https://issues.apache.org/jira/browse/LUCENE-7957
>             Project: Lucene - Core
>          Issue Type: Bug
>          Components: core/search
>            Reporter: Michael McCandless
>            Assignee: Michael McCandless
>             Fix For: master (8.0), 7.1
>
>
> Today it returns all scoring children and misses the `FILTER` clauses; I 
> think we just need to save the incoming `required` parameter to the ctor and 
> iterate over those in `getChildren` since `scorers` is a subset of `required`?



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to