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

David Smiley commented on LUCENE-7091:
--------------------------------------

Eh, the grow algorithm/code still isn't right.  The code in the patch will 
double the size even though it's likely plenty big to add the current long 
trying to get added.  This is what I mean:
{code:java}
      case SORTED_NUMERIC:
        if (info.numericProducer.dvLongValues == null) {
          info.numericProducer.dvLongValues = new long[4];
        }
        info.numericProducer.dvLongValues = 
ArrayUtil.grow(info.numericProducer.dvLongValues, info.numericProducer.count + 
1);
        info.numericProducer.dvLongValues[info.numericProducer.count++] = 
(long) docValuesValue;
        break;
{code}

Everything else is good.  Assuming you agree with this code snippet above, +1 
from me to commit.

> Add doc values support to MemoryIndex
> -------------------------------------
>
>                 Key: LUCENE-7091
>                 URL: https://issues.apache.org/jira/browse/LUCENE-7091
>             Project: Lucene - Core
>          Issue Type: Improvement
>            Reporter: Martijn van Groningen
>            Assignee: David Smiley
>         Attachments: LUCENE-7091.patch, LUCENE-7091.patch, LUCENE-7091.patch, 
> LUCENE-7091.patch, LUCENE-7091.patch, LUCENE-7091.patch, LUCENE-7091.patch, 
> LUCENE-7091.patch
>
>
> Sometimes queries executed via the MemoryIndex require certain things to be 
> stored as doc values. Today this isn't possible because the memory index 
> doesn't support this and these queries silently return no results.



--
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