Searcher
Leave feedback
On this page
Inheritance: java.lang.Object
public abstract class Searcher
Represents a service that manages search queries to shards of the search network.
| Constructor | Description |
|---|---|
| Searcher() |
| Method | Description |
|---|---|
| searchFirst(String query, SearchOptions options) | Starts a search with a query in text form in the distributed search index. |
| searchFirst(SearchQuery query, SearchOptions options) | Starts a search in the distributed search index. |
| searchFirst(SearchImage image, ImageSearchOptions options) | Performs a reverse image search in the distributed search index. |
| searchNext(NetworkSearchToken networkSearchToken) | Continues a search in the distributed search index. |
| searchNext(NetworkImageSearchToken networkImageSearchToken) | Continues a reverse image search in the distributed search index. |
| highlight(NetworkFoundDocument document, Highlighter highlighter, HighlightOptions options) | Generates HTML formatted text with highlighted found terms. |
| getIndexedDocuments(int shardIndex) | Gets an array of all indexed documents. |
| getIndexedDocumentItems(NetworkDocumentInfo documentInfo) | Gets an array of nested items of the specified document (for container documents such as ZIP, OST, PST). |
| getDocumentText(NetworkDocumentInfo documentInfo, OutputAdapter adapter) | Generates the text of an indexed document and passes it through an output adapter. |
public Searcher()
public abstract NetworkSearchResult searchFirst(String query, SearchOptions options)
Starts a search with a query in text form in the distributed search index.
Parameters:
| Parameter | Type | Description |
|---|---|---|
| query | java.lang.String | The search query. |
| options | SearchOptions | The search options. |
Returns: NetworkSearchResult - The search result.
public abstract NetworkSearchResult searchFirst(SearchQuery query, SearchOptions options)
Starts a search in the distributed search index.
Parameters:
| Parameter | Type | Description |
|---|---|---|
| query | SearchQuery | The search query. |
| options | SearchOptions | The search options. |
Returns: NetworkSearchResult - The search result.
public abstract NetworkImageSearchResult searchFirst(SearchImage image, ImageSearchOptions options)
Performs a reverse image search in the distributed search index.
Parameters:
| Parameter | Type | Description |
|---|---|---|
| image | SearchImage | The image to search. |
| options | ImageSearchOptions | The image search options. |
Returns: NetworkImageSearchResult - The reverse image search result.
public abstract NetworkSearchResult searchNext(NetworkSearchToken networkSearchToken)
Continues a search in the distributed search index.
Parameters:
| Parameter | Type | Description |
|---|---|---|
| networkSearchToken | NetworkSearchToken | The network search token. |
Returns: NetworkSearchResult - The search result.
public abstract NetworkImageSearchResult searchNext(NetworkImageSearchToken networkImageSearchToken)
Continues a reverse image search in the distributed search index.
Parameters:
| Parameter | Type | Description |
|---|---|---|
| networkImageSearchToken | NetworkImageSearchToken | The network image search token. |
Returns: NetworkImageSearchResult - The reverse image search result.
public abstract void highlight(NetworkFoundDocument document, Highlighter highlighter, HighlightOptions options)
Generates HTML formatted text with highlighted found terms.
Parameters:
| Parameter | Type | Description |
|---|---|---|
| document | NetworkFoundDocument | The found document. |
| highlighter | Highlighter | The search result highlighter. |
| options | HighlightOptions | The highlight options. |
public abstract NetworkDocumentInfo[] getIndexedDocuments(int shardIndex)
Gets an array of all indexed documents.
Parameters:
| Parameter | Type | Description |
|---|---|---|
| shardIndex | int | The shard index. |
Returns: com.groupdocs.search.scaling.results.NetworkDocumentInfo[] - An array of all indexed documents.
public abstract NetworkDocumentInfo[] getIndexedDocumentItems(NetworkDocumentInfo documentInfo)
Gets an array of nested items of the specified document (for container documents such as ZIP, OST, PST).
Parameters:
| Parameter | Type | Description |
|---|---|---|
| documentInfo | NetworkDocumentInfo | The document info. |
Returns: com.groupdocs.search.scaling.results.NetworkDocumentInfo[] - An array of a document items.
public abstract void getDocumentText(NetworkDocumentInfo documentInfo, OutputAdapter adapter)
Generates the text of an indexed document and passes it through an output adapter.
Parameters:
| Parameter | Type | Description |
|---|---|---|
| documentInfo | NetworkDocumentInfo | The indexed document info. |
| adapter | OutputAdapter | The output adapter. |
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.