FoundDocument class
Leave feedback
On this page
Represents a found document.
Learn more:
The FoundDocument type exposes the following members:
| Method | Description |
|---|---|
| deserialize | Deserializes a FoundDocument instance from a byte array. |
| serialize | Serializes the current instance to a byte array. |
| to_string | Returns a string representation of the found document. |
| Property | Description |
|---|---|
| attributes | The attributes associated with the found document. The corresponding option must be enabled in the search options to retrieve attributes. |
| document_info | The document info. |
| found_fields | The document fields found. |
| occurrence_count | The number of occurrences found. |
| relevance | The relevance of search result. |
| term_sequences | The term sequences found. |
| terms | The terms found; the value is evaluated each time the property is accessed. |
from groupdocs.search import Index
index = Index("./index")
index.add("./documents")
result = index.search("contract")
for found in result: # FoundDocument
print(found.document_info.file_path, found.occurrence_count, found.relevance)
print("fields:", [f.field_name for f in found.found_fields])
- module
groupdocs.search.results
Was this page helpful?
Any additional feedback you'd like to share with us?
Please tell us how we can improve this page.
Thank you for your feedback!
We value your opinion. Your feedback will help us improve our documentation.