search

Describes how to build and run a Classic Search query.

The function search(query_schema, size, function_name, collection_name) searchs for documents inside a collection.

Input

  • query_schema – Specifies the document for query schema object.

  • size – Specifies the number of results to return.

  • function_name – Specifies the scoring function to be used in the Classic Search query as described in Step 1, Creating the Scoring Function.

  • collection_name – Specifies the Collection in which to search.

  • fields (optional) – Specifies the document fields to be returned with each result.

Example-

results = hyperspace_client.search(lexical_query_schema,
                                   size=5,
                                   function_name='score_function',
                                   fields=["fieldname1", "fieldname2"],               
                                   collection_name=collection_name)

Last updated

#108: Max's Nov 6 changes

Change request updated