FoundDocument
Inheritance: java.lang.Object
public abstract class FoundDocument
Represents a found document.
Learn more
Constructors
Constructor | Description |
---|---|
FoundDocument() |
Methods
Method | Description |
---|---|
getDocumentInfo() | Gets the document info. |
getRelevance() | Gets the relevance of search result. |
getOccurrenceCount() | Gets the number of occurrences found. |
getFoundFields() | Gets the document fields found. |
getTerms() | Gets the terms found. |
getTermSequences() | Gets the term sequences found. |
getAttributes() | Gets the attributes associated with the found document. |
toString() | Returns string representation of the found document. |
serialize() | Serializes the current instance to a byte array. |
deserialize(byte[] array) | Deserializes an instance from a byte array. |
FoundDocument()
public FoundDocument()
getDocumentInfo()
public abstract DocumentInfo getDocumentInfo()
Gets the document info.
Returns: DocumentInfo - The document info.
getRelevance()
public abstract double getRelevance()
Gets the relevance of search result.
Returns: double - The relevance of search result.
getOccurrenceCount()
public abstract int getOccurrenceCount()
Gets the number of occurrences found.
Returns: int - The number of occurrences found.
getFoundFields()
public abstract FoundDocumentField[] getFoundFields()
Gets the document fields found.
Returns: com.groupdocs.search.results.FoundDocumentField[] - The document fields found.
getTerms()
public abstract String[] getTerms()
Gets the terms found. The value is evaluated each time the property is accessed.
Returns: java.lang.String[] - The terms found.
getTermSequences()
public abstract String[][] getTermSequences()
Gets the term sequences found.
Returns: java.lang.String[][] - The term sequences found.
getAttributes()
public abstract String[] getAttributes()
Gets the attributes associated with the found document. The corresponding option must be enabled in the search options to retrieve attributes.
Returns: java.lang.String[] - The attributes associated with the found document.
toString()
public abstract String toString()
Returns string representation of the found document.
Returns: java.lang.String - A string that represents the found document.
serialize()
public abstract byte[] serialize()
Serializes the current instance to a byte array.
Returns: byte[] - A byte array representing the current instance.
deserialize(byte[] array)
public static FoundDocument deserialize(byte[] array)
Deserializes an instance from a byte array.
Parameters:
Parameter | Type | Description |
---|---|---|
array | byte[] | A byte array to deserialize from. |
Returns: FoundDocument - An instance deserialized from a byte array.