Method GetTermFreqVector
GetTermFreqVector(Int32, String)
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.
Declaration
public abstract ITermFreqVector GetTermFreqVector(int docNumber, String field)
Parameters
Type | Name | Description |
---|---|---|
System.Int32 | docNumber | document for which the term frequency vector is returned |
String | field | field for which the term frequency vector is returned. |
Returns
Type | Description |
---|---|
ITermFreqVector | term frequency vector May be null if field does not exist in the specified document or term vector was not stored. |
See Also
GetTermFreqVector(Int32, String, TermVectorMapper)
Load the Term Vector into a user-defined data structure instead of relying on the parallel arrays of the ITermFreqVector.
Declaration
public abstract void GetTermFreqVector(int docNumber, String field, TermVectorMapper mapper)
Parameters
Type | Name | Description |
---|---|---|
System.Int32 | docNumber | The number of the document to load the vector for |
String | field | The name of the field to load |
TermVectorMapper | mapper | The TermVectorMapper to process the vector. Must not be null |
GetTermFreqVector(Int32, TermVectorMapper)
Map all the term vectors for all fields in a Document
Declaration
public abstract void GetTermFreqVector(int docNumber, TermVectorMapper mapper)
Parameters
Type | Name | Description |
---|---|---|
System.Int32 | docNumber | The number of the document to load the vector for |
TermVectorMapper | mapper | The TermVectorMapper to process the vector. Must not be null |