public class FoundDocument extends Object
Learn more
Modifier | Constructor and Description |
---|---|
protected |
FoundDocument(DocumentInfo documentInfo,
double relevance,
int occurrenceCount,
FoundDocumentField[] detailedResults,
String[][] termSequences,
boolean isCaseSensitive)
Initializes a new instance of the
FoundDocument class. |
Modifier and Type | Method and Description |
---|---|
protected static void |
adjustRelevance(FoundDocument foundDocument,
double additionalRelevance) |
protected static FoundDocument |
create(DocumentInfo documentInfo,
double relevance,
int occurrenceCount,
FoundDocumentField[] detailedResults,
String[][] termSequences,
boolean isCaseSensitive) |
static FoundDocument |
deserialize(byte[] array)
Deserializes an instance from a byte array.
|
DocumentInfo |
getDocumentInfo()
Gets the document info.
|
FoundDocumentField[] |
getFoundFields()
Gets the document fields found.
|
int |
getOccurrenceCount()
Gets the number of occurrences found.
|
double |
getRelevance()
Gets the relevance of search result.
|
String[] |
getTerms()
Gets the terms found.
|
String[][] |
getTermSequences()
Gets the term sequences found.
|
protected static boolean |
isCaseSensitive(FoundDocument foundDocument) |
byte[] |
serialize()
Serializes the current instance to a byte array.
|
String |
toString()
Returns string representation of the found document.
|
protected FoundDocument(DocumentInfo documentInfo, double relevance, int occurrenceCount, FoundDocumentField[] detailedResults, String[][] termSequences, boolean isCaseSensitive)
Initializes a new instance of the FoundDocument
class.
documentInfo
- The document information.relevance
- The relevance.occurrenceCount
- The occurrence count.detailedResults
- The detailed results.termSequences
- The term sequences.isCaseSensitive
- The case sensitivity flag.protected static FoundDocument create(DocumentInfo documentInfo, double relevance, int occurrenceCount, FoundDocumentField[] detailedResults, String[][] termSequences, boolean isCaseSensitive)
public final DocumentInfo getDocumentInfo()
Gets the document info.
public final double getRelevance()
Gets the relevance of search result.
public final int getOccurrenceCount()
Gets the number of occurrences found.
public final FoundDocumentField[] getFoundFields()
Gets the document fields found.
public final String[] getTerms()
Gets the terms found. The value is evaluated each time the property is accessed.
public final String[][] getTermSequences()
Gets the term sequences found.
public String toString()
Returns string representation of the found document.
public final byte[] serialize()
Serializes the current instance to a byte array.
public static FoundDocument deserialize(byte[] array)
Deserializes an instance from a byte array.
array
- A byte array to deserialize from.protected static boolean isCaseSensitive(FoundDocument foundDocument)
protected static void adjustRelevance(FoundDocument foundDocument, double additionalRelevance)