Package org.apache.lucene.util

Examples of org.apache.lucene.util.BytesRef.grow()


        for(int i=grams-1;i>0;i--) {
          BytesRef token = lastTokens[i-1];
          if (token == null) {
            continue;
          }
          token.grow(token.length+1);
          token.bytes[token.length] = separator;
          token.length++;
          lastTokens[i] = token;
        }
        lastTokens[0] = new BytesRef();
View Full Code Here


        int numEntries = output.ords.size();
        // output size, assume the worst case
        int estimatedSize = 5 + numEntries * 5; // numEntries + one ord for each entry
       
        scratch.grow(estimatedSize);
        scratchOutput.reset(scratch.bytes, scratch.offset, scratch.bytes.length);
        assert scratch.offset == 0;

        // now write our output data:
        int count = 0;
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.