Starts a search with a query in text form in the distributed search index.
defsearch_first(self,query,options):...
Parameter
Type
Description
query
str
The search query.
options
SearchOptions
The search options.
Returns: NetworkSearchResult: The search result.
Example
fromgroupdocs.search.optionsimportSearchOptions# `node` is the master node of a configured and started search networksearcher=node.searcheroptions=SearchOptions()options.is_chunk_search=True# a search network searches by chunks onlyresult=searcher.search_first("einstein",options)print("Documents found:",result.document_count)
search_first
Starts a search with a query object in the distributed search index.
defsearch_first(self,query,options):...
Parameter
Type
Description
query
SearchQuery
The search query.
options
SearchOptions
The search options.
Returns: The search result.
Example
# Assuming `searcher` is an instance of Searcher, and `query` and `options` are prepared:result=searcher.search_first(query,options)
search_first
Starts a reverse image search in the distributed search index.
defsearch_first(self,image,options):...
Parameter
Type
Description
image
SearchImage
The image to search.
options
ImageSearchOptions
The image search options.
Returns: NetworkImageSearchResult: The reverse image search result.
Example
fromgroupdocs.search.optionsimportImageSearchOptionsfromgroupdocs.search.scalingimportSearcher# Assume `searcher` is an initialized Searcher instance and `image` is a loaded image.result=searcher.search_first(image,ImageSearchOptions())# `result` is a NetworkImageSearchResult containing the images found in one shard.
Aliases
These names call search_first too, limited to the overloads listed.