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

Adrien Grand commented on LUCENE-6352:
--------------------------------------

Just had another look at the patch and found two issues:
 - Occurrences still allocates blocks using MAX_VALUE instead of the number of 
docs per segment
 - Scores allocates using '(valueCount + arraySize - 1) / arraySize' but I 
think we need to cast to a long before the addition and then back to an int 
after the division in order to avoid overflows if the doc count in the segment 
is greater than MAX_VALUE - arraySize. So this would be: '(int) (((long) 
valueCount + arraySize - 1) / arraySize)'

Otherwise +1 to commit! This is interesting usage of two-phase iteration.


> Add global ordinal based query time join 
> -----------------------------------------
>
>                 Key: LUCENE-6352
>                 URL: https://issues.apache.org/jira/browse/LUCENE-6352
>             Project: Lucene - Core
>          Issue Type: Improvement
>            Reporter: Martijn van Groningen
>         Attachments: LUCENE-6352.patch, LUCENE-6352.patch, LUCENE-6352.patch, 
> LUCENE-6352.patch, LUCENE-6352.patch, LUCENE-6352.patch
>
>
> Global ordinal based query time join as an alternative to the current query 
> time join. The implementation is faster for subsequent joins between reopens, 
> but requires an OrdinalMap to be built.
> This join has certain restrictions and requirements:
> * A document can only refer to on other document. (but can be referred by one 
> or more documents)
> * A type field must exist on all documents and each document must be 
> categorized to a type. This is to distingues between the "from" and "to" side.
> * There must be a single sorted doc values field use by both the "from" and 
> "to" documents. By encoding join into a single doc values field it is trival 
> to build an ordinals map from 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