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

Atri Sharma commented on LUCENE-8791:
-------------------------------------

Hi [~elbek....@gmail.com]

 

Thanks for another iteration. A few other comments:

 

1) In buildSegmentScorers, could we rename maxDoc as endDoc? Since maxDoc is 
what is used to typically denote the number of documents in a segment, the code 
can be conflicting to read.

 

2) When mapping LeafSlices to SegmentScorers, we do another loop post the 
construction of SegmentScorers. Is there a way where we could do the mapping in 
buildSegmentScorers itself at the time of scorer task allocation?

 

3) I am a bit unsure about how the rescorer method works. If IndexSearcher has 
non empty slices, then that implies that a non null ExecutorService was passed 
in to IndexSearcher. Is there any correlation to that and CollectorRescorer 
using an ExecutorService?

If yes, then a plain assert to check that ExecutorService is not null should 
suffice and there is no need for the if-else block.

If not, then we should ignore IndexSearcher's LeafSlices when CollectorRescorer 
is going single threaded i.e. we should not do the slices to segment mapping, 
since we anyways are not going to use that.

 

4) Could you please break up rescorer method into more modular objects? 
Ideally, a method each for sequential and parallel cases. Also, there is some 
code duplication at the tail where you do the sequential execution, that should 
get eliminated.

> Add CollectorRescorer
> ---------------------
>
>                 Key: LUCENE-8791
>                 URL: https://issues.apache.org/jira/browse/LUCENE-8791
>             Project: Lucene - Core
>          Issue Type: Improvement
>            Reporter: Elbek Kamoliddinov
>            Priority: Major
>         Attachments: LUCENE-8791.patch, LUCENE-8791.patch
>
>
> This is another implementation of query rescorer api (LUCENE-5489). It adds 
> rescoring functionality based on provided CollectorManager. 
>  



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscr...@lucene.apache.org
For additional commands, e-mail: dev-h...@lucene.apache.org

Reply via email to