Save This Page
Home » lucene-2.3.2-src » org.apache » lucene » index » memory » [javadoc | source]
org.apache.lucene.index.memory
static final class: MemoryIndex.Info [javadoc | source]
java.lang.Object
   org.apache.lucene.index.memory.MemoryIndex$Info

All Implemented Interfaces:
    Serializable

Index data structure for a field; Contains the tokenized term texts and their positions.
Field Summary
public transient  Term template    Term for this field's fieldName, lazily computed on demand 
Constructor:
 public Info(HashMap terms,
    int numTokens,
    float boost) 
Method from org.apache.lucene.index.memory.MemoryIndex$Info Summary:
getBoost,   getPositions,   getPositions,   sortTerms
Methods from java.lang.Object:
equals,   getClass,   hashCode,   notify,   notifyAll,   toString,   wait,   wait,   wait
Method from org.apache.lucene.index.memory.MemoryIndex$Info Detail:
 public float getBoost() 
 public MemoryIndex.ArrayIntList getPositions(String term) 
    note that the frequency can be calculated as numPosition(getPositions(x))
 public MemoryIndex.ArrayIntList getPositions(int pos) 
    note that the frequency can be calculated as numPosition(getPositions(x))
 public  void sortTerms() 
    Sorts hashed terms into ascending order, reusing memory along the way. Note that sorting is lazily delayed until required (often it's not required at all). If a sorted view is required then hashing + sort + binary search is still faster and smaller than TreeMap usage (which would be an alternative and somewhat more elegant approach, apart from more sophisticated Tries / prefix trees).