Свойство | Тип | Описание | |
---|---|---|---|
DEFAULT_TERMS_INDEX_DIVISOR | int | ||
hasChanges | bool |
Метод | Описание | |
---|---|---|
Clone ( bool openReadOnly ) : |
Clones the IndexReader and optionally changes readOnly. A readOnly reader cannot open a writeable reader.
|
|
Clone ( ) : |
Efficiently clones the IndexReader (sharing most internal state). On cloning a reader with pending changes (deletions, norms), the original reader transfers its write lock to the cloned reader. This means only the cloned reader may make further changes to the index, and commit the changes to the index on close, but the old reader still reflects all changes made up until it was cloned. Like Reopen(), it's safe to make changes to either the original or the cloned reader: all shared mutable state obeys "copy on write" semantics to ensure the changes are not seen by other readers.
|
|
Commit ( ) : void |
Commit changes resulting from delete, undeleteAll, or setNorm operations If an exception is hit, then either no changes or all changes will have been committed to the index (transactional semantics).
|
|
Commit ( string>.IDictionary |
Commit changes resulting from delete, undeleteAll, or setNorm operations If an exception is hit, then either no changes or all changes will have been committed to the index (transactional semantics).
|
|
DecRef ( ) : void |
Expert: decreases the refCount of this IndexReader instance. If the refCount drops to 0, then pending changes (if any) are committed to the index and this reader is closed.
|
|
DeleteDocument ( int docNum ) : void |
Deletes the document numbered since this reader was opened has this index open (
|
|
DeleteDocuments ( Lucene.Net.Index.Term term ) : int |
Deletes all documents that have a given since this reader was opened has this index open (
|
|
Directory ( ) : |
Returns the directory associated with this index. The Default implementation returns the directory specified by subclasses when delegating to the IndexReader(Directory) constructor, or throws an UnsupportedOperationException if one was not specified.
|
|
Dispose ( ) : void |
Closes files associated with this index. Also saves any new deletions to disk. No other methods should be called after this has been called.
|
|
DocFreq ( Lucene.Net.Index.Term t ) : int |
Returns the number of documents containing the term
|
|
Document ( int n ) : Lucene.Net.Documents.Document |
Returns the stored fields of the NOTE: for performance reasons, this method does not check if the requested document is deleted, and therefore asking for a deleted document may yield unspecified results. Usually this is not required, however you can call IsDeleted(int) with the requested document ID to verify the document is not deleted.
|
|
Document ( int n, Lucene.Net.Documents.FieldSelector fieldSelector ) : Lucene.Net.Documents.Document |
Get the Lucene.Net.Documents.Document at the NOTE: for performance reasons, this method does not check if the requested document is deleted, and therefore asking for a deleted document may yield unspecified results. Usually this is not required, however you can call IsDeleted(int) with the requested document ID to verify the document is not deleted.
|
|
Flush ( ) : void |
|
|
Flush ( string>.IDictionary |
||
GetCommitUserData ( |
Reads commitUserData, previously passed to IndexWriter.Commit(System.Collections.Generic.IDictionary{string, string}), from current index segments file. This will return null if IndexWriter.Commit(System.Collections.Generic.IDictionary{string, string}) has never been called for this index.
|
|
GetCurrentVersion ( |
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.
|
|
GetFieldNames ( FieldOption fldOption ) : ICollection |
Get a list of unique field names that exist in this index and have the specified field option information.
|
|
GetSequentialSubReaders ( ) : Lucene.Net.Index.IndexReader[] |
Expert: returns the sequential sub readers that this reader is logically composed of. For example, IndexSearcher uses this API to drive searching by one sub reader at a time. If this reader is not composed of sequential child readers, it should return null. If this method returns an empty array, that means this reader is a null reader (for example a MultiReader that has no sub readers). NOTE: You should not try using sub-readers returned by this method to make any changes (setNorm, deleteDocument, etc.). While this might succeed for one composite reader (like MultiReader), it will most likely lead to index corruption for other readers (like DirectoryReader obtained through IndexReader.Open(Lucene.Net.Store.Directory,bool). Use the parent reader directly.
|
|
GetTermFreqVector ( int docNumber, String field ) : ITermFreqVector |
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 TermPositionVector is returned.
|
|
GetTermFreqVector ( int docNumber, String field, Lucene.Net.Index.TermVectorMapper mapper ) : void |
Load the Term Vector into a user-defined data structure instead of relying on the parallel arrays of the ITermFreqVector.
|
|
GetTermFreqVector ( int docNumber, Lucene.Net.Index.TermVectorMapper mapper ) : void |
Map all the term vectors for all fields in a Document
|
|
GetTermFreqVectors ( int docNumber ) : ITermFreqVector[] |
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 contains terms and frequencies for all terms in a given vectorized field. If no such fields existed, the method returns null. The term vectors that are returned may either be of type ITermFreqVector or of type TermPositionVector if positions or offsets have been stored.
|
|
HasNorms ( System field ) : bool |
Returns true if there are norms stored for this field.
|
|
IncRef ( ) : void |
Expert: increments the refCount of this IndexReader instance. RefCounts are used to determine when a reader can be closed safely, i.e. as soon as there are no more references. Be sure to always call a corresponding DecRef, in a finally clause; otherwise the reader may never be closed. Note that Close simply calls decRef(), which means that the IndexReader will not really be closed until DecRef has been called for all outstanding references.
|
|
IndexExists ( |
Returns
|
|
IsCurrent ( ) : bool |
Check whether any new changes have occurred to the index since this reader was opened. If this reader is based on a Directory (ie, was created by calling
If instead this reader is a near real-time reader (ie, obtained by a call to IndexWriter.GetReader(), or by calling Reopen() on a near real-time reader), then this method checks if either a new commmit has occurred, or any new uncommitted changes have taken place via the writer. Note that even if the writer has only performed merging, this method will still return false.
In any event, if this returns false, you should call Reopen() to get a new reader that sees the changes.
|
|
IsDeleted ( int n ) : bool |
Returns true if document n has been deleted
|
|
IsOptimized ( ) : bool |
Checks is the index is optimized (if it has a single segment and no deletions). Not implemented in the IndexReader base class.
|
|
LastModified ( Directory directory2 ) : long |
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.
|
|
ListCommits ( Directory dir ) : System.Collections.Generic.ICollection |
Returns all commit points that exist in the Directory. Normally, because the default is KeepOnlyLastCommitDeletionPolicy , there would be only one commit point. But if you're using a custom IndexDeletionPolicy then there could be many commits. Once you have a given commit, you can open a reader on it by calling IndexReader.Open(IndexCommit,bool) There must be at least one commit in the Directory, else this method throws System.IO.IOException. Note that if a commit is in progress while this method is running, that commit may or may not be returned array.
|
|
Norms ( System field ) : byte[] |
Returns the byte-encoded normalization factor for the named field of every document. This is used by the search code to score documents.
|
|
Norms ( System field, byte bytes, int offset ) : void |
Reads the byte-encoded normalization factor for the named field of every document. This is used by the search code to score documents.
|
|
Open ( Directory directory, IndexDeletionPolicy deletionPolicy, bool readOnly ) : IndexReader |
Expert: returns an IndexReader reading the index in the given Directory, with a custom IndexDeletionPolicy . You should pass readOnly=true, since it gives much better concurrent performance, unless you intend to do write operations (delete documents or change norms) with the reader.
|
|
Open ( Directory directory, IndexDeletionPolicy deletionPolicy, bool readOnly, int termInfosIndexDivisor ) : IndexReader |
Expert: returns an IndexReader reading the index in the given Directory, with a custom IndexDeletionPolicy . You should pass readOnly=true, since it gives much better concurrent performance, unless you intend to do write operations (delete documents or change norms) with the reader.
|
|
Open ( Directory directory, bool readOnly ) : IndexReader |
Returns an IndexReader reading the index in the given Directory. You should pass readOnly=true, since it gives much better concurrent performance, unless you intend to do write operations (delete documents or change norms) with the reader.
|
|
Open ( IndexCommit commit, IndexDeletionPolicy deletionPolicy, bool readOnly ) : IndexReader |
Expert: returns an IndexReader reading the index in the given Directory, using a specific commit and with a custom IndexDeletionPolicy. You should pass readOnly=true, since it gives much better concurrent performance, unless you intend to do write operations (delete documents or change norms) with the reader.
|
|
Open ( IndexCommit commit, IndexDeletionPolicy deletionPolicy, bool readOnly, int termInfosIndexDivisor ) : IndexReader |
Expert: returns an IndexReader reading the index in the given Directory, using a specific commit and with a custom IndexDeletionPolicy. You should pass readOnly=true, since it gives much better concurrent performance, unless you intend to do write operations (delete documents or change norms) with the reader.
|
|
Open ( IndexCommit commit, bool readOnly ) : IndexReader |
Expert: returns an IndexReader reading the index in the given IndexCommit. You should pass readOnly=true, since it gives much better concurrent performance, unless you intend to do write operations (delete documents or change norms) with the reader.
|
|
Reopen ( ) : IndexReader |
Refreshes an IndexReader if the index has changed since this instance was (re)opened. Opening an IndexReader is an expensive operation. This method can be used to refresh an existing IndexReader to reduce these costs. This method tries to only load segments that have changed or were created after the IndexReader was (re)opened. If the index has not changed since this instance was (re)opened, then this call is a NOOP and returns this instance. Otherwise, a new instance is returned. The old instance is not closed and remains usable. If the reader is reopened, even though they share resources internally, it's safe to make changes (deletions, norms) with the new reader. All shared mutable state obeys "copy on write" semantics to ensure the changes are not seen by other readers. You can determine whether a reader was actually reopened by comparing the old instance with the instance returned by this method: NOTE: If this reader is a near real-time reader (obtained from IndexWriter.GetReader(), reopen() will simply call writer.getReader() again for you, though this may change in the future.
|
|
Reopen ( IndexCommit commit ) : IndexReader |
Expert: reopen this reader on a specific commit point. This always returns a readOnly reader. If the specified commit point matches what this reader is already on, and this reader is already readOnly, then this same instance is returned; if it is not already readOnly, a readOnly clone is returned.
|
|
Reopen ( bool openReadOnly ) : IndexReader |
Just like Reopen(), except you can change the readOnly of the original reader. If the index is unchanged but readOnly is different then a new reader will be returned.
|
|
SetNorm ( int doc, String field, byte value ) : void |
Expert: Resets the normalization factor for the named field of the named document. The norm represents the product of the field's since this reader was opened has this index open (
|
|
SetNorm ( int doc, System field, float value ) : void |
Expert: Resets the normalization factor for the named field of the named document. since this reader was opened has this index open (
|
|
TermDocs ( ) : TermDocs |
Returns an unpositioned Lucene.Net.Index.TermDocs enumerator.
|
|
TermDocs ( Term term ) : TermDocs |
Returns an enumeration of all the documents which contain
The enumeration is ordered by document number. Each document number is greater than all that precede it in the enumeration.
|
|
TermPositions ( ) : TermPositions |
Returns an unpositioned Lucene.Net.Index.TermPositions enumerator.
|
|
TermPositions ( Term term ) : TermPositions |
Returns an enumeration of all the documents which contain
This positional information facilitates phrase and proximity searching. The enumeration is ordered by document number. Each document number is greater than all that precede it in the enumeration.
|
|
Terms ( ) : TermEnum |
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. Note that after calling terms(), TermEnum.Next() must be called on the resulting enumeration before calling other methods such as TermEnum.Term.
|
|
Terms ( Term t ) : TermEnum |
Returns an enumeration of all terms starting at a given term. If the given term does not exist, the enumeration is positioned at the first term greater than the supplied term. The enumeration is ordered by Term.compareTo(). Each term is greater than all that precede it in the enumeration.
|
|
UndeleteAll ( ) : void |
Undeletes all documents currently marked as deleted in this index. since this reader was opened has this index open (
|
|
this ( int doc ) : Lucene.Net.Documents.Document |
Returns the stored fields of the NOTE: for performance reasons, this method does not check if the requested document is deleted, and therefore asking for a deleted document may yield unspecified results. Usually this is not required, however you can call IsDeleted(int) with the requested document ID to verify the document is not deleted.
|
Метод | Описание | |
---|---|---|
AcquireWriteLock ( ) : void |
Does nothing by default. Subclasses that require a write lock for index modifications must implement this method.
|
|
Dispose ( bool disposing ) : void | ||
DoClose ( ) : void |
Implements close.
|
|
DoCommit ( string>.IDictionary |
Implements commit.
|
|
DoDelete ( int docNum ) : void |
Implements deletion of the document numbered
|
|
DoSetNorm ( int doc, System field, byte value_Renamed ) : void |
Implements setNorm in subclass.
|
|
DoUndeleteAll ( ) : void |
Implements actual undeleteAll() in subclass.
|
|
EnsureOpen ( ) : void | ||
IndexReader ( ) : System |
Метод | Описание | |
---|---|---|
Close ( ) : void | ||
Main ( String args ) : void | ||
NumDocs ( ) : int | ||
Open ( Directory directory, IndexDeletionPolicy deletionPolicy, IndexCommit commit, bool readOnly, int termInfosIndexDivisor ) : IndexReader |
public Clone ( bool openReadOnly ) : |
||
openReadOnly | bool | |
Результат |
public Commit ( string>.IDictionary |
||
commitUserData | string>.IDictionary | |
Результат | void |
public DeleteDocument ( int docNum ) : void | ||
docNum | int | |
Результат | void |
public DeleteDocuments ( Lucene.Net.Index.Term term ) : int | ||
term | Lucene.Net.Index.Term | |
Результат | int |
protected Dispose ( bool disposing ) : void | ||
disposing | bool | |
Результат | void |
protected abstract DoCommit ( string>.IDictionary |
||
commitUserData | string>.IDictionary | |
Результат | void |
protected abstract DoDelete ( int docNum ) : void | ||
docNum | int | |
Результат | void |
protected abstract DoSetNorm ( int doc, System field, byte value_Renamed ) : void | ||
doc | int | |
field | System | |
value_Renamed | byte | |
Результат | void |
protected abstract DoUndeleteAll ( ) : void | ||
Результат | void |
public abstract DocFreq ( Lucene.Net.Index.Term t ) : int | ||
t | Lucene.Net.Index.Term | |
Результат | int |
public Document ( int n ) : Lucene.Net.Documents.Document | ||
n | int | |
Результат | Lucene.Net.Documents.Document |
public abstract Document ( int n, Lucene.Net.Documents.FieldSelector fieldSelector ) : Lucene.Net.Documents.Document | ||
n | int | Get the document at the |
fieldSelector | Lucene.Net.Documents.FieldSelector | The |
Результат | Lucene.Net.Documents.Document |
public Flush ( string>.IDictionary |
||
commitUserData | string>.IDictionary | Opaque Map (String -> String)
/// that's recorded into the segments file in the index,
/// and retrievable by |
Результат | void |
public static GetCommitUserData ( |
||
directory | where the index resides. /// | |
Результат | IDictionary |
public static GetCurrentVersion ( |
||
directory | where the index resides. /// | |
Результат | long |
public abstract GetFieldNames ( FieldOption fldOption ) : ICollection |
||
fldOption | FieldOption | specifies which field option should be available for the returned fields /// |
Результат | ICollection |
public GetSequentialSubReaders ( ) : Lucene.Net.Index.IndexReader[] | ||
Результат | Lucene.Net.Index.IndexReader[] |
abstract public GetTermFreqVector ( int docNumber, String field ) : ITermFreqVector | ||
docNumber | int | document for which the term frequency vector is returned /// |
field | String | field for which the term frequency vector is returned. /// |
Результат | ITermFreqVector |
abstract public GetTermFreqVector ( int docNumber, String field, Lucene.Net.Index.TermVectorMapper mapper ) : void | ||
docNumber | int | The number of the document to load the vector for /// |
field | String | The name of the field to load /// |
mapper | Lucene.Net.Index.TermVectorMapper | The |
Результат | void |
abstract public GetTermFreqVector ( int docNumber, Lucene.Net.Index.TermVectorMapper mapper ) : void | ||
docNumber | int | The number of the document to load the vector for /// |
mapper | Lucene.Net.Index.TermVectorMapper | The |
Результат | void |
abstract public GetTermFreqVectors ( int docNumber ) : ITermFreqVector[] | ||
docNumber | int | document for which term frequency vectors are returned /// |
Результат | ITermFreqVector[] |
public static IndexExists ( |
||
directory | the directory to check for an index /// | |
Результат | bool |
public abstract IsDeleted ( int n ) : bool | ||
n | int | |
Результат | bool |
public static LastModified ( Directory directory2 ) : long | ||
directory2 | Directory | |
Результат | long |
public static ListCommits ( Directory dir ) : System.Collections.Generic.ICollection |
||
dir | Directory | |
Результат | System.Collections.Generic.ICollection |
public abstract Norms ( System field ) : byte[] | ||
field | System | |
Результат | byte[] |
public abstract Norms ( System field, byte bytes, int offset ) : void | ||
field | System | |
bytes | byte | |
offset | int | |
Результат | void |
public static Open ( Directory directory, IndexDeletionPolicy deletionPolicy, bool readOnly ) : IndexReader | ||
directory | Directory | the index directory /// |
deletionPolicy | IndexDeletionPolicy | a custom deletion policy (only used
/// if you use this reader to perform deletes or to set
/// norms); see |
readOnly | bool | true if no changes (deletions, norms) will be made with this IndexReader /// |
Результат | IndexReader |
public static Open ( Directory directory, IndexDeletionPolicy deletionPolicy, bool readOnly, int termInfosIndexDivisor ) : IndexReader | ||
directory | Directory | the index directory /// |
deletionPolicy | IndexDeletionPolicy | a custom deletion policy (only used
/// if you use this reader to perform deletes or to set
/// norms); see |
readOnly | bool | true if no changes (deletions, norms) will be made with this IndexReader /// |
termInfosIndexDivisor | int | Subsamples which indexed
/// terms are loaded into RAM. This has the same effect as |
Результат | IndexReader |
public static Open ( Directory directory, bool readOnly ) : IndexReader | ||
directory | Directory | the index directory |
readOnly | bool | true if no changes (deletions, norms) will be made with this IndexReader |
Результат | IndexReader |
public static Open ( IndexCommit commit, IndexDeletionPolicy deletionPolicy, bool readOnly ) : IndexReader | ||
commit | IndexCommit | the specific |
deletionPolicy | IndexDeletionPolicy | a custom deletion policy (only used
/// if you use this reader to perform deletes or to set
/// norms); see |
readOnly | bool | true if no changes (deletions, norms) will be made with this IndexReader /// |
Результат | IndexReader |
public static Open ( IndexCommit commit, IndexDeletionPolicy deletionPolicy, bool readOnly, int termInfosIndexDivisor ) : IndexReader | ||
commit | IndexCommit | the specific |
deletionPolicy | IndexDeletionPolicy | a custom deletion policy (only used
/// if you use this reader to perform deletes or to set
/// norms); see |
readOnly | bool | true if no changes (deletions, norms) will be made with this IndexReader /// |
termInfosIndexDivisor | int | Subsambles which indexed
/// terms are loaded into RAM. This has the same effect as |
Результат | IndexReader |
public static Open ( IndexCommit commit, bool readOnly ) : IndexReader | ||
commit | IndexCommit | the commit point to open /// |
readOnly | bool | true if no changes (deletions, norms) will be made with this IndexReader /// |
Результат | IndexReader |
public Reopen ( IndexCommit commit ) : IndexReader | ||
commit | IndexCommit | |
Результат | IndexReader |
public Reopen ( bool openReadOnly ) : IndexReader | ||
openReadOnly | bool | |
Результат | IndexReader |
public SetNorm ( int doc, String field, byte value ) : void | ||
doc | int | |
field | String | |
value | byte | |
Результат | void |
public SetNorm ( int doc, System field, float value ) : void | ||
doc | int | |
field | System | |
value | float | |
Результат | void |
public abstract TermPositions ( ) : TermPositions | ||
Результат | TermPositions |
public TermPositions ( Term term ) : TermPositions | ||
term | Term | |
Результат | TermPositions |
public abstract Terms ( Term t ) : TermEnum | ||
t | Term | |
Результат | TermEnum |
public this ( int doc ) : Lucene.Net.Documents.Document | ||
doc | int | |
Результат | Lucene.Net.Documents.Document |
protected static int DEFAULT_TERMS_INDEX_DIVISOR | ||
Результат | int |