<version>
Definition at line 30 of file MultiReader.cs.
Public Member Functions | |
void | Close () |
Closes files associated with this index. Also saves any new deletions to disk. No other methods should be called after this has been called. | |
int | Delete (Term term) |
Deletes all documents containing term | |
void | Delete (int docNum) |
Deletes the document numbered docNum | |
void | DeleteDocument (int docNum) |
Deletes the document numbered docNum | |
int | DeleteDocuments (Term term) |
Deletes all documents containing term | |
virtual Directory | Directory () |
Returns the directory this index resides in. | |
override int | DocFreq (Term t) |
Returns the number of documents containing the term t | |
override Document | Document (int n) |
Returns the stored fields of the n | |
abstract System.Collections.ICollection | GetFieldNames (FieldOption fldOption) |
Get a list of unique field names that exist in this index and have the specified field option information. | |
override System.Collections.ICollection | GetFieldNames (IndexReader.FieldOption fieldNames) |
override System.Collections.ICollection | GetFieldNames (bool indexed) |
override System.Collections.ICollection | GetFieldNames () |
virtual System.Collections.ICollection | GetIndexedFieldNames (bool storedTermVector) |
override System.Collections.ICollection | GetIndexedFieldNames (Field.TermVector tvSpec) |
Get a list of unique field names that exist in this index, are indexed, and have the specified term vector information. | |
override TermFreqVector | GetTermFreqVector (int n, System.String field) |
Return a term frequency vector for the specified document and field. The returned vector contains terms and frequencies for the terms in the specified field of this document, if the field had the storeTermVector flag set. If termvectors had been stored with positions or offsets, a TermPositionsVector is returned. | |
override TermFreqVector[] | GetTermFreqVectors (int n) |
Return an array of term frequency vectors for the specified document. The array contains a vector for each vectorized field in the document. Each vector vector contains term numbers and frequencies for all terms in a given vectorized field. If no such fields existed, the method returns null. | |
virtual long | GetVersion () |
Version number when this IndexReader was opened. | |
override bool | HasDeletions () |
Returns true if any documents have been deleted. | |
override bool | HasNorms (System.String field) |
Returns true if there are norms stored for this field. | |
virtual bool | IsCurrent () |
Check whether this IndexReader still works on a current version of the index. If this is not the case you will need to re-open the IndexReader to make sure you see the latest changes made to the index. | |
override bool | IsDeleted (int n) |
Returns true if document n has been deleted. | |
override int | MaxDoc () |
Returns one greater than the largest possible document number. This may be used to, e.g., determine how big to allocate an array which will have an element for every document number in an index. | |
MultiReader (Directory directory, SegmentInfos sis, bool closeDirectory, IndexReader[] subReaders) | |
Construct reading the named set of readers. | |
MultiReader (IndexReader[] subReaders) | |
override void | Norms (System.String field, byte[] result, int offset) |
Reads the byte-encoded normalization factor for the named field of every document. This is used by the search code to score documents. | |
override byte[] | Norms (System.String field) |
Returns the byte-encoded normalization factor for the named field of every document. This is used by the search code to score documents. | |
override int | NumDocs () |
Returns the number of documents in this index. | |
virtual void | SetNorm (int doc, System.String field, float value_Renamed) |
Expert: Resets the normalization factor for the named field of the named document. | |
void | SetNorm (int doc, System.String field, byte value_Renamed) |
Expert: Resets the normalization factor for the named field of the named document. The norm represents the product of the field's boost and its int) length normalization. Thus, to preserve the length normalization values when resetting this, one should base the new value upon the old. | |
virtual TermDocs | TermDocs (Term term) |
Returns an enumeration of all the documents which contain term | |
override TermDocs | TermDocs () |
Returns an unpositioned TermDocs enumerator. | |
virtual TermPositions | TermPositions (Term term) |
Returns an enumeration of all the documents which contain term | |
override TermPositions | TermPositions () |
Returns an unpositioned TermPositions enumerator. | |
override TermEnum | Terms (Term term) |
Returns an enumeration of all terms after a given term. The enumeration is ordered by Term.compareTo(). Each term is greater than all that precede it in the enumeration. | |
override TermEnum | Terms () |
Returns an enumeration of all the terms in the index. The enumeration is ordered by Term.compareTo(). Each term is greater than all that precede it in the enumeration. | |
void | UndeleteAll () |
Undeletes all documents currently marked as deleted in this index. | |
Static Public Member Functions | |
static long | GetCurrentVersion (Directory directory) |
Reads version number from segments files. The version number is initialized with a timestamp and then increased by one for each change of the index. | |
static long | GetCurrentVersion (System.IO.FileInfo directory) |
Reads version number from segments files. The version number is initialized with a timestamp and then increased by one for each change of the index. | |
static long | GetCurrentVersion (System.String directory) |
Reads version number from segments files. The version number is initialized with a timestamp and then increased by one for each change of the index. | |
static bool | IndexExists (Directory directory) |
Returns true
| |
static bool | IndexExists (System.IO.FileInfo directory) |
Returns true
| |
static bool | IndexExists (System.String directory) |
Returns true
false
| |
static bool | IsLocked (System.String directory) |
Returns true
| |
static bool | IsLocked (Directory directory) |
Returns true
| |
static long | LastModified (Directory directory) |
Returns the time the index in the named directory was last modified. Do not use this to check whether the reader is still up-to-date, use IsCurrent() instead. | |
static long | LastModified (System.IO.FileInfo directory) |
Returns the time the index in the named directory was last modified. Do not use this to check whether the reader is still up-to-date, use IsCurrent() instead. | |
static long | LastModified (System.String directory) |
Returns the time the index in the named directory was last modified. Do not use this to check whether the reader is still up-to-date, use IsCurrent() instead. | |
static void | Main (System.String[] args) |
Prints the filename and size of each file within a given compound file. Add the -extract flag to extract files to the current working directory. In order to make the extracted version of the index work, you have to copy the segments file from the compound index into the directory where the extracted files are stored. | |
static IndexReader | Open (Directory directory) |
Returns an IndexReader reading the index in the given Directory. | |
static IndexReader | Open (System.IO.FileInfo path) |
Returns an IndexReader reading the index in an FSDirectory in the named path. | |
static IndexReader | Open (System.String path) |
Returns an IndexReader reading the index in an FSDirectory in the named path. | |
static void | Unlock (Directory directory) |
Forcibly unlocks the index in the named directory. | |
Protected Member Functions | |
internal void | Commit () |
Commit changes resulting from delete, undeleteAll, or setNorm operations. | |
internal override void | DoClose () |
Implements close. | |
internal override void | DoCommit () |
Implements commit. | |
internal override void | DoDelete (int n) |
Implements deletion of the document numbered docNum | |
internal override void | DoSetNorm (int n, System.String field, byte value_Renamed) |
Implements setNorm in subclass. | |
internal override void | DoUndeleteAll () |
Implements actual undeleteAll() in subclass. | |
Private Member Functions | |
byte[] | FakeNorms () |
void | Initialize (IndexReader[] subReaders) |
int | ReaderIndex (int n) |
Private Attributes | |
bool | hasDeletions = false |
int | maxDoc = 0 |
System.Collections.Hashtable | normsCache = System.Collections.Hashtable.Synchronized(new System.Collections.Hashtable()) |
int | numDocs = - 1 |
byte[] | ones |
int[] | starts |
IndexReader[] | subReaders |