query
$index->search('YourQuery');
Can be used in these methods:
search,
browseObjects,
searchForFacetValues,
generateSecuredApiKey,
addApiKey,
updateApiKey
search,
browse_objects,
search_for_facet_values,
generate_secured_api_key,
add_api_key,
update_api_key
search,
browseObjects,
searchForFacetValues,
generateSecuredApiKey,
addApiKey,
updateApiKey
search,
browse_objects,
search_for_facet_values,
generate_secured_api_key,
add_api_key,
update_api_key
search,
browse,
searchForFacetValues,
generateSecuredApiKey,
addAPIKey,
updateAPIKey
search,
browseObjects,
searchForFacetValues,
generateSecuredApiKey,
addApiKey,
updateApiKey
Search,
Browse,
SearchForFacetValues,
GenerateSecuredApiKeys,
AddApiKey,
UpdateApiKey
Search,
browse,
searchForFacetValues,
generateSecuredApiKey,
addApiKey,
updateApiKey
Search,
BrowseObjects,
SearchForFacetValues,
GenerateSecuredAPIKey,
AddAPIKey,
UpdateAPIKey
search,
browse index,
search into facet values,
generateSecuredApiKey,
add key,
update key
About this parameter
Input text that specifies what should be searched for in the index.
- Empty queries match all records in your index, ordered by
customRanking
. - Queries can be up to 512 bytes.
- You can’t use boolean operations (AND, OR, NOT) in queries.
- Queries with multiple words only match records where all words match.
For example, the query “hot dog” is interpreted as “hot” AND “dog” (rather than “hot” OR “dog”).
You can relax this requirement if there are no matches with the
removeWordsIfNoResults
parameter.
Examples
Search for “shirt”
1
$results = $index->search('shirt');
Return all records
1
$results = $index->search('');