FileOutputAdapter class
Leave feedback
On this page
Represents an output adapter that collects output into a file.
Learn more:
The FileOutputAdapter type exposes the following members:
| Constructor | Description |
|---|---|
| init | Initializes a new instance of the FileOutputAdapter class. |
| Property | Description |
|---|---|
| file_path | The output file path. |
| output_format | The output format. (inherited from ResultBuilderFactory) |
from groupdocs.search import Index
from groupdocs.search.common import FileOutputAdapter
from groupdocs.search.highlighters import DocumentHighlighter
from groupdocs.search.options import OutputFormat
with Index("./index") as index:
result = index.search("Einstein")
if result.document_count > 0:
adapter = FileOutputAdapter(OutputFormat.HTML, "./output/Highlighted.html")
highlighter = DocumentHighlighter(adapter)
index.highlight(result.get_found_document(0), highlighter)
Task guides that use FileOutputAdapter:
- module
groupdocs.search.common
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.