lucene-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Robert Muir (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (LUCENE-6229) Remove Scorer.getChildren?
Date Tue, 17 Feb 2015 19:44:12 GMT

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

Robert Muir commented on LUCENE-6229:
-------------------------------------

I think a lot of the problem i have with the current API is that it is so undefined, for example
when getChildren() or freq() are allowed to be called.

In some cases like ReqOptSumScorer, we can work around the issue partially, but it makes code
more confusing (it calls score() in its freq(), which might invoke a deferred advance() on
the optional part). And it doesn't really fix the issue, if you navigate to the "leaf" nodes
you will find the optional ones positioned on the wrong docID often. I think the optimization
in this case is simple and effective, so it would be a shame to limit our performance because
of this API.

On the other hand, I like the idea of being able to navigate the scorers tree, at least for
debugging. If the API was completely "transparent" it would still meet that use case. So the
main question is, what are the other important use cases? Do they justify limiting our performance
or completely specializing potentially many scorers to support, or is there a more restrictive
API that would still work.

> 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: dev-unsubscribe@lucene.apache.org
For additional commands, e-mail: dev-help@lucene.apache.org


Mime
View raw message