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

Michael McCandless commented on LUCENE-6959:
--------------------------------------------

I agree it's messy that one must use a special {{IndexSearcher}} to use this 
collector, and that it's overly invasive that it needs access to child scorers, 
and we should find a better way.

This collector enables you to get the matching child hits when running a joined 
search against child hits up to parent documents.  This is very important for 
people "joining up" with document blocks, e.g. I use this in 
http://jirasearch.mikemccandless.com, where child documents are each jira 
comment, and parent documents are the whole jira issue.

I'd like to understand a bit better how exactly we can re-implement this 
functionality once we remove the collector.  That ES query class seems to be 
created for each parent doc that made the top N hits, right?  And then you 
search with that query, which is very quick since it will hone in on just the 
children of that one parent, and build up your child hits that way ... I think 
this is indeed a better approach!

It's sort of weird to remove this class without first making the cleaner 
implementation available, but since neither Solr nor ES use it, I think it's OK 
(and it is experimental).  Can we at least open an issue to add the cleaner 
option?  I can try to tackle it, certainly when I next upgrade jirasearch ;)  
Thanks, +1 to remove in 6.x and 7.0.

> Remove ToParentBlockJoinCollector
> ---------------------------------
>
>                 Key: LUCENE-6959
>                 URL: https://issues.apache.org/jira/browse/LUCENE-6959
>             Project: Lucene - Core
>          Issue Type: Task
>            Reporter: Adrien Grand
>            Assignee: Adrien Grand
>            Priority: Minor
>         Attachments: LUCENE-6959.patch
>
>
> This collector uses the getWeight() and getChildren() methods from the passed 
> in Scorer, which are not always available (eg. disjunctions expose fake 
> scorers) hence the need for a dedicated IndexSearcher 
> (ToParentBlockJoinIndexSearcher). Given that this is the only collector in 
> this case, I would like to remove it.



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

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

Reply via email to