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

Terry Smith commented on LUCENE-6229:
-------------------------------------

I’ll summarize this as two options:

# Remove getChildren() as it complicates the code hurting the ability to 
maintain it and make performance enhancements.
# Make getChildren() a more well defined API that gives you the ability to 
retrieve child scorers that are correctly positioned.

You are looking for data to backup option 2 to determine if this is an API that 
is worth fixing/keeping.

Here are the use cases that I have:

# Custom scoring of a BooleanQuery. A query that wraps any BooleanQuery which 
it uses for recall but supplies it’s own scoring algorithm to aggregate the 
scores from the original clauses.
# Custom DrillSidewaysQuery. A query that can use the sideways scorers for 
precision instead of just recall.
# Recursive DrillSidewaysQuery (not implemented, tricky). A query that could 
perform DrillSideways for union or in a nested fashion.
# Auxillary metadata. An enhancement that can augment the current recall 
(boolean match) and precision (float score) for a document in the search 
pipeline to add extra information that can be used from Query and FunctionValue 
instances (collected via a custom Collector) and supported by a custom 
SortField.

These can be categorized into two camps:

# Using an existing Query (typically BooleanQuery) to find matches but 
providing some combination of
## custom scoring that isn’t compatible with the Similarity API.
## custom recall (think DrillSideways)
# Adding extra information to the search pipeline that can be 
## generated by leaf queries and value sources
## aggregated by composing queries (BooleanQuery, DisjunctionMaxQuery, etc)
## survive wrapping queries and value sources that don’t know about it
## collected and sorted on

Hope this helps.

> Remove Scorer.getChildren?
> --------------------------
>
>                 Key: LUCENE-6229
>                 URL: https://issues.apache.org/jira/browse/LUCENE-6229
>             Project: Lucene - Core
>          Issue Type: Improvement
>            Reporter: Adrien Grand
>            Priority: Minor
>
> This API is used in a single place in our code base: 
> ToParentBlockJoinCollector. In addition, the usage is a bit buggy given that 
> using this API from a collector only works if setScorer is called with an 
> actual Scorer (and not eg. FakeScorer or BooleanScorer like you would get in 
> disjunctions) so it needs a custom IndexSearcher that does not use the 
> BulkScorer API.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

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

Reply via email to