I see in the docs of ToParentBlockJoinQuery that:

 * The child documents must be orthogonal to the parent
 * documents: the wrapped child query must never
 * return a parent document.

First, it would be helpful if the docs explained what would happen if that assumption were violated.

Second, I want to do that!

My parent documents have the same fields as their child documents (title, text, etc): in some cases the best match for a query is the entire book, (ie a query for "Java Programming"), in other cases it is a specific chapter (a query for "Java regular expressions").

Currently I am using Solr grouping queries to roll up parent and child, but I am hoping to get a performance boost by using the parent/child indexing which is a natural for us since we always index a book at a time.

If need be, I will simply index a child document that represents the parent (ie duplicate the parent document but with a different type so as to exclude it from the join subquery), but is this really necessary? If so, can you explain why?


Thanks

-Mike


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

Reply via email to