Lucene.Net  3.0.3
Lucene.Net is a .NET port of the Java Lucene Indexing Library
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Properties
Public Member Functions | Public Attributes | List of all members
Lucene.Net.Index.FieldInfos Class Reference

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. More...

Inherits ICloneable.

Public Member Functions

 FieldInfos ()
 
 FieldInfos (Directory d, String name)
 Construct a FieldInfos object using the directory and the name of the file IndexInput
 
Object Clone ()
 Returns a deep clone of this FieldInfos instance.
 
void Add (Document doc)
 Adds field info for a Document.
 
void AddIndexed (System.Collections.Generic.ICollection< string > names, bool storeTermVectors, bool storePositionWithTermVector, bool storeOffsetWithTermVector)
 Add fields that are indexed. Whether they have termvectors has to be specified.
 
void Add (System.Collections.Generic.ICollection< string > names, bool isIndexed)
 Assumes the fields are not storing term vectors.
 
void Add (String name, bool isIndexed)
 Calls 5 parameter add with false for all TermVector parameters.
 
void Add (System.String name, bool isIndexed, bool storeTermVector)
 Calls 5 parameter add with false for term vector positions and offsets.
 
void Add (System.String name, bool isIndexed, bool storeTermVector, bool storePositionWithTermVector, bool 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.
 
void Add (System.String name, bool isIndexed, bool storeTermVector, bool storePositionWithTermVector, bool storeOffsetWithTermVector, bool 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.
 
FieldInfo Add (System.String name, bool isIndexed, bool storeTermVector, bool storePositionWithTermVector, bool storeOffsetWithTermVector, bool omitNorms, bool storePayloads, bool omitTermFreqAndPositions)
 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.
 
int FieldNumber (System.String fieldName)
 
FieldInfo FieldInfo (System.String fieldName)
 
System.String FieldName (int fieldNumber)
 Return the fieldName identified by its number.
 
FieldInfo FieldInfo (int fieldNumber)
 Return the fieldinfo object referenced by the fieldNumber.
 
int Size ()
 
bool HasVectors ()
 
void Write (Directory d, System.String name)
 
void Write (IndexOutput output)
 

Public Attributes

const int FORMAT_PRE = - 1
 
const int FORMAT_START = - 2
 

Detailed Description

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.

Definition at line 36 of file FieldInfos.cs.

Constructor & Destructor Documentation

Lucene.Net.Index.FieldInfos.FieldInfos ( )

Definition at line 59 of file FieldInfos.cs.

Lucene.Net.Index.FieldInfos.FieldInfos ( Directory  d,
String  name 
)

Construct a FieldInfos object using the directory and the name of the file IndexInput

Parameters
dThe directory to open the IndexInput from
nameThe name of the file to open the IndexInput from in the Directory

<throws> IOException </throws>

Definition at line 71 of file FieldInfos.cs.

Member Function Documentation

void Lucene.Net.Index.FieldInfos.Add ( Document  doc)

Adds field info for a Document.

Definition at line 140 of file FieldInfos.cs.

void Lucene.Net.Index.FieldInfos.Add ( System.Collections.Generic.ICollection< string >  names,
bool  isIndexed 
)

Assumes the fields are not storing term vectors.

Parameters
namesThe names of the fields
isIndexedWhether the fields are indexed or not
See Also
Add(String, bool)

Definition at line 201 of file FieldInfos.cs.

void Lucene.Net.Index.FieldInfos.Add ( String  name,
bool  isIndexed 
)

Calls 5 parameter add with false for all TermVector parameters.

Parameters
nameThe name of the Fieldable
isIndexedtrue if the field is indexed
See Also
Add(String, bool, bool, bool, bool)

Definition at line 221 of file FieldInfos.cs.

void Lucene.Net.Index.FieldInfos.Add ( System.String  name,
bool  isIndexed,
bool  storeTermVector 
)

Calls 5 parameter add with false for term vector positions and offsets.

Parameters
nameThe name of the field
isIndexedtrue if the field is indexed
storeTermVectortrue if the term vector should be stored

Definition at line 238 of file FieldInfos.cs.

void Lucene.Net.Index.FieldInfos.Add ( System.String  name,
bool  isIndexed,
bool  storeTermVector,
bool  storePositionWithTermVector,
bool  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.

Parameters
nameThe name of the field
isIndexedtrue if the field is indexed
storeTermVectortrue if the term vector should be stored
storePositionWithTermVectortrue if the term vector with positions should be stored
storeOffsetWithTermVectortrue if the term vector with offsets should be stored

Definition at line 262 of file FieldInfos.cs.

void Lucene.Net.Index.FieldInfos.Add ( System.String  name,
bool  isIndexed,
bool  storeTermVector,
bool  storePositionWithTermVector,
bool  storeOffsetWithTermVector,
bool  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.

Parameters
nameThe name of the field
isIndexedtrue if the field is indexed
storeTermVectortrue if the term vector should be stored
storePositionWithTermVectortrue if the term vector with positions should be stored
storeOffsetWithTermVectortrue if the term vector with offsets should be stored
omitNormstrue if the norms for the indexed field should be omitted

Definition at line 289 of file FieldInfos.cs.

FieldInfo Lucene.Net.Index.FieldInfos.Add ( System.String  name,
bool  isIndexed,
bool  storeTermVector,
bool  storePositionWithTermVector,
bool  storeOffsetWithTermVector,
bool  omitNorms,
bool  storePayloads,
bool  omitTermFreqAndPositions 
)

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.

Parameters
nameThe name of the field
isIndexedtrue if the field is indexed
storeTermVectortrue if the term vector should be stored
storePositionWithTermVectortrue if the term vector with positions should be stored
storeOffsetWithTermVectortrue if the term vector with offsets should be stored
omitNormstrue if the norms for the indexed field should be omitted
storePayloadstrue if payloads should be stored for this field
omitTermFreqAndPositionstrue if term freqs should be omitted for this field

Definition at line 319 of file FieldInfos.cs.

void Lucene.Net.Index.FieldInfos.AddIndexed ( System.Collections.Generic.ICollection< string >  names,
bool  storeTermVectors,
bool  storePositionWithTermVector,
bool  storeOffsetWithTermVector 
)

Add fields that are indexed. Whether they have termvectors has to be specified.

Parameters
namesThe names of the fields
storeTermVectorsWhether the fields store term vectors or not
storePositionWithTermVectortrue if positions should be stored.
storeOffsetWithTermVectortrue if offsets should be stored

Definition at line 180 of file FieldInfos.cs.

Object Lucene.Net.Index.FieldInfos.Clone ( )

Returns a deep clone of this FieldInfos instance.

Definition at line 123 of file FieldInfos.cs.

FieldInfo Lucene.Net.Index.FieldInfos.FieldInfo ( System.String  fieldName)

Definition at line 351 of file FieldInfos.cs.

FieldInfo Lucene.Net.Index.FieldInfos.FieldInfo ( int  fieldNumber)

Return the fieldinfo object referenced by the fieldNumber.

Parameters
fieldNumber
Returns
the FieldInfo object or null when the given fieldNumber doesn't exist.

Definition at line 376 of file FieldInfos.cs.

System.String Lucene.Net.Index.FieldInfos.FieldName ( int  fieldNumber)

Return the fieldName identified by its number.

Parameters
fieldNumber
Returns
the fieldName or an empty string when the field with the given number doesn't exist.

Definition at line 364 of file FieldInfos.cs.

int Lucene.Net.Index.FieldInfos.FieldNumber ( System.String  fieldName)

Definition at line 345 of file FieldInfos.cs.

bool Lucene.Net.Index.FieldInfos.HasVectors ( )

Definition at line 386 of file FieldInfos.cs.

int Lucene.Net.Index.FieldInfos.Size ( )

Definition at line 381 of file FieldInfos.cs.

void Lucene.Net.Index.FieldInfos.Write ( Directory  d,
System.String  name 
)

Definition at line 400 of file FieldInfos.cs.

void Lucene.Net.Index.FieldInfos.Write ( IndexOutput  output)

Definition at line 413 of file FieldInfos.cs.

Member Data Documentation

const int Lucene.Net.Index.FieldInfos.FORMAT_PRE = - 1

Definition at line 40 of file FieldInfos.cs.

const int Lucene.Net.Index.FieldInfos.FORMAT_START = - 2

Definition at line 43 of file FieldInfos.cs.


The documentation for this class was generated from the following file: