lucene-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From iverase <...@git.apache.org>
Subject [GitHub] lucene-solr pull request #451: LUCENE-8496: Add selective indexing to BKD/PO...
Date Tue, 02 Oct 2018 14:06:44 GMT
Github user iverase commented on a diff in the pull request:

    https://github.com/apache/lucene-solr/pull/451#discussion_r221582158
  
    --- Diff: lucene/core/src/java/org/apache/lucene/util/bkd/BKDReader.java ---
    @@ -442,11 +442,12 @@ void visitDocValues(int[] commonPrefixLengths, byte[] scratchPackedValue1,
byte[
         readCommonPrefixes(commonPrefixLengths, scratchPackedValue1, in);
     
         if (numIndexDims != 1 && version >= BKDWriter.VERSION_LEAF_STORES_BOUNDS)
{
    -      byte[] minPackedValue = scratchPackedValue1;
    -      byte[] maxPackedValue = scratchPackedValue2;
    +      byte[] minPackedValue = new byte[packedIndexBytesLength];
    +      byte[] maxPackedValue = new byte[packedIndexBytesLength];
    --- End diff --
    
    Maybe we should try to avoid to allocate a new array for every visited leaf node. We can
create byte array helpers on IntersectState with the correct length.


---

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


Mime
View raw message