Beispiel #1
0
 /** Resets the {@link MemoryIndex} to its initial state and recycles all internal buffers. */
 public void reset() {
   fields.clear();
   this.normSimilarity = IndexSearcher.getDefaultSimilarity();
   byteBlockPool.reset(false, false); // no need to 0-fill the buffers
   intBlockPool.reset(true, false); // here must must 0-fill since we use slices
   if (payloadsBytesRefs != null) {
     payloadsBytesRefs.clear();
   }
   this.frozen = false;
 }