search
Use this method to debug the relevance of a specific record.
This method accepts a condition
and returns the first matching object along with its position information in the result set.
The findObject method uses search internally so it can also retrieve the position for a given query.
To retrieve an object, use the more efficient getObjects method instead.
Examples
Parameters
Response
The hit matching your callback.A hit is made of the schemaless JSON object that you stored in the index.However, Algolia enriches them with additional fields like
_highlightResult.Example:JSON
Number of the current page (zero-based).
See the
page search parameter.Response as JSON
This section shows the JSON response returned by the API. Each API client wraps this response in language-specific objects, so the structure may vary. To view the response, use thegetLogs method.
Don’t rely on the order of properties—JSON objects don’t preserve key order.
JSON