Save This Page
Home » lucene-2.3.2-src » org.apache » lucene » index » [javadoc | source]
org.apache.lucene.index
final class: FieldInfos [javadoc | source]
java.lang.Object
   org.apache.lucene.index.FieldInfos
Access to the Fieldable Info file that describes document fields and whether or not they are indexed. Each segment has a separate Fieldable Info file. Objects of this class are thread-safe for multiple readers, but only one thread can be adding documents at a time, with no other reader or writer threads accessing this object.
Field Summary
static final  byte IS_INDEXED     
static final  byte STORE_TERMVECTOR     
static final  byte STORE_POSITIONS_WITH_TERMVECTOR     
static final  byte STORE_OFFSET_WITH_TERMVECTOR     
static final  byte OMIT_NORMS     
static final  byte STORE_PAYLOADS     
Constructor:
 FieldInfos() 
 FieldInfos(Directory d,
    String name) throws IOException 
    Construct a FieldInfos object using the directory and the name of the file IndexInput
    Parameters:
    d - The directory to open the IndexInput from
    name - The name of the file to open the IndexInput from in the Directory
    Throws:
    IOException -
Method from org.apache.lucene.index.FieldInfos Summary:
add,   add,   add,   add,   add,   add,   add,   addIndexed,   clone,   fieldInfo,   fieldInfo,   fieldName,   fieldNumber,   hasVectors,   size,   write,   write
Methods from java.lang.Object:
equals,   getClass,   hashCode,   notify,   notifyAll,   toString,   wait,   wait,   wait
Method from org.apache.lucene.index.FieldInfos Detail:
 public  void add(Document doc) 
    Adds field info for a Document.
 public  void add(Collection names,
    boolean isIndexed) 
    Assumes the fields are not storing term vectors.
 public  void add(String name,
    boolean isIndexed) 
    Calls 5 parameter add with false for all TermVector parameters.
 public  void add(String name,
    boolean isIndexed,
    boolean storeTermVector) 
    Calls 5 parameter add with false for term vector positions and offsets.
 public  void add(String name,
    boolean isIndexed,
    boolean storeTermVector,
    boolean storePositionWithTermVector,
    boolean storeOffsetWithTermVector) 
    If the field is not yet known, adds it. If it is known, checks to make sure that the isIndexed flag is the same as was given previously for this field. If not - marks it as being indexed. Same goes for the TermVector parameters.
 public  void add(String name,
    boolean isIndexed,
    boolean storeTermVector,
    boolean storePositionWithTermVector,
    boolean storeOffsetWithTermVector,
    boolean omitNorms) 
    If the field is not yet known, adds it. If it is known, checks to make sure that the isIndexed flag is the same as was given previously for this field. If not - marks it as being indexed. Same goes for the TermVector parameters.
 public FieldInfo add(String name,
    boolean isIndexed,
    boolean storeTermVector,
    boolean storePositionWithTermVector,
    boolean storeOffsetWithTermVector,
    boolean omitNorms,
    boolean storePayloads) 
    If the field is not yet known, adds it. If it is known, checks to make sure that the isIndexed flag is the same as was given previously for this field. If not - marks it as being indexed. Same goes for the TermVector parameters.
 public  void addIndexed(Collection names,
    boolean storeTermVectors,
    boolean storePositionWithTermVector,
    boolean storeOffsetWithTermVector) 
    Add fields that are indexed. Whether they have termvectors has to be specified.
 public Object clone() 
    Returns a deep clone of this FieldInfos instance.
 public FieldInfo fieldInfo(String fieldName) 
 public FieldInfo fieldInfo(int fieldNumber) 
    Return the fieldinfo object referenced by the fieldNumber.
 public String fieldName(int fieldNumber) 
    Return the fieldName identified by its number.
 public int fieldNumber(String fieldName) 
 public boolean hasVectors() 
 public int size() 
 public  void write(IndexOutput output) throws IOException 
 public  void write(Directory d,
    String name) throws IOException