Searcher

Inheritance: java.lang.Object

public abstract class Searcher

Represents a service that manages search queries to shards of the search network.

Constructors

Constructor Description
Searcher()

Methods

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.

Searcher()

public Searcher()

searchFirst(String query, SearchOptions options)

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.

searchFirst(SearchQuery query, SearchOptions options)

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.

searchFirst(SearchImage image, ImageSearchOptions options)

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.

searchNext(NetworkSearchToken networkSearchToken)

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.

searchNext(NetworkImageSearchToken networkImageSearchToken)

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.

highlight(NetworkFoundDocument document, Highlighter highlighter, HighlightOptions options)

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.

getIndexedDocuments(int shardIndex)

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.

getIndexedDocumentItems(NetworkDocumentInfo documentInfo)

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.

getDocumentText(NetworkDocumentInfo documentInfo, OutputAdapter adapter)

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.