Search API (1.0.0)
Download OpenAPI specification:Download
Use the Search REST API to manage your data (indices and records), implement search, and improve relevance (with Rules, synonyms, and language dictionaries).
Although Algolia provides a REST API, you should use the official open source API clients, libraries, and tools instead. There's no SLA if you use the REST API directly.
Manage indices, including listing them, checking and updating settings, deleting, copying, and renaming.
Delete index
Delete an existing index.
Authorizations:
path Parameters
indexName required | string Example: myIndexName Index on which to perform the request. |
Responses
Response samples
- 200
- 400
- 402
- 403
- 404
{- "taskID": 1514562690001,
- "deletedAt": "2023-06-27T14:42:38.831Z"
}
Get index settings
Return an object containing an index's configuration settings.
Authorizations:
path Parameters
indexName required | string Example: myIndexName Index on which to perform the request. |
Responses
Response samples
- 200
- 400
- 402
- 403
- 404
{- "replicas": [
- "virtual(prod_products_price_asc)",
- "dev_products_replica"
], - "paginationLimitedTo": 20,
- "unretrievableAttributes": [
- "popularity"
], - "disableTypoToleranceOnWords": [
- "wheel",
- "1X2BCD"
], - "attributesToTransliterate": [
- "name",
- "description"
], - "camelCaseAttributes": [
- "description"
], - "decompoundedAttributes": {
- "de": [
- "name"
]
}, - "indexLanguages": [
- "ja"
], - "disablePrefixOnAttributes": [
- "sku"
], - "allowCompressionOfIntegerArray": false,
- "numericAttributesForFiltering": [
- "quantity",
- "popularity"
], - "separatorsToIndex": "+#",
- "searchableAttributes": [
- "title,alternative_title",
- "author",
- "unordered(text)",
- "emails.personal"
], - "userData": {
- "settingID": "f2a7b51e3503acc6a39b3784ffb84300",
- "pluginVersion": "1.6.0"
}, - "customNormalization": "{default: {'ä': 'ae', 'ü': 'ue'}}\n",
- "attributesForFaceting": [
- "author",
- "filterOnly(isbn)",
- "searchable(edition)",
- "afterDistinct(category)",
- "afterDistinct(searchable(publisher))"
], - "attributesToRetrieve": [
- "author",
- "title",
- "content"
], - "ranking": [
- "typo",
- "geo",
- "words",
- "filters",
- "proximity",
- "attribute",
- "exact",
- "custom"
], - "customRanking": [
- "desc(popularity)",
- "asc(price)"
], - "relevancyStrictness": 90,
- "attributesToHighlight": [
- "author",
- "title",
- "content"
], - "attributesToSnippet": [
- "content:80",
- "description"
], - "highlightPreTag": "<em>",
- "highlightPostTag": "</em>",
- "snippetEllipsisText": "…",
- "restrictHighlightAndSnippetArrays": false,
- "hitsPerPage": 20,
- "minWordSizefor1Typo": 4,
- "minWordSizefor2Typos": 8,
- "typoTolerance": true,
- "allowTyposOnNumericTokens": true,
- "disableTypoToleranceOnAttributes": [
- "sku"
], - "ignorePlurals": [
- "ca",
- "es"
], - "removeStopWords": [
- "ca",
- "es"
], - "keepDiacriticsOnCharacters": "øé",
- "queryLanguages": [
- "es"
], - "decompoundQuery": true,
- "enableRules": true,
- "enablePersonalization": false,
- "queryType": "prefixLast",
- "removeWordsIfNoResults": "firstWords",
- "mode": "neuralSearch",
- "semanticSearch": {
- "eventSources": [
- "string"
]
}, - "advancedSyntax": false,
- "optionalWords": [
- "blue",
- "iphone case"
], - "disableExactOnAttributes": [
- "description"
], - "exactOnSingleWordQuery": "attribute",
- "alternativesAsExact": [
- "ignorePlurals",
- "singleWordSynonym"
], - "advancedSyntaxFeatures": [
- "exactPhrase",
- "excludeWords"
], - "distinct": 1,
- "attributeForDistinct": "url",
- "replaceSynonymsInHighlight": false,
- "minProximity": 1,
- "responseFields": [ ],
- "maxFacetHits": 10,
- "maxValuesPerFacet": 100,
- "sortFacetValuesBy": "count",
- "attributeCriteriaComputedByMinProximity": false,
- "renderingContent": {
- "facetOrdering": {
- "facets": {
- "order": [
- "string"
]
}, - "values": {
- "property1": {
- "order": [
- "string"
], - "sortRemainingBy": "count"
}, - "property2": {
- "order": [
- "string"
], - "sortRemainingBy": "count"
}
}
}
}, - "enableReRanking": true,
- "reRankingApplyFilter": [
- [
- "string"
]
]
}
Update index settings
Update the specified index settings. Specifying null for a setting resets it to its default value.
Authorizations:
path Parameters
indexName required | string Example: myIndexName Index on which to perform the request. |
query Parameters
forwardToReplicas | boolean Indicates whether changed index settings are forwarded to the replica indices. |
Request Body schema: application/json
replicas | Array of strings Default: [] Creates replicas, which are copies of a primary index with the same records but different settings. |
paginationLimitedTo | integer Default: 1000 Maximum number of hits accessible through pagination. |
unretrievableAttributes | Array of strings Default: [] Attributes that can't be retrieved at query time. |
disableTypoToleranceOnWords | |
attributesToTransliterate | Array of strings Attributes in your index to which Japanese transliteration applies. This will ensure that words indexed in Katakana or Kanji can also be searched in Hiragana. |
camelCaseAttributes | |
decompoundedAttributes | |
indexLanguages | Array of strings Default: [] Set the languages of your index, for language-specific processing steps such as tokenization and normalization. |
disablePrefixOnAttributes | |
allowCompressionOfIntegerArray | boolean Default: false Incidates whether the engine compresses arrays with exclusively non-negative integers. When enabled, the compressed arrays may be reordered. |
numericAttributesForFiltering | |
separatorsToIndex | string Default: "" Controls which separators are added to an Algolia index as part of normalization. Separators are all non-letter characters except spaces and currency characters, such as $€£¥. |
searchableAttributes | Array of strings Default: [] |
userData | object (userData) Default: {} Lets you store custom data in your indices. |
object A list of characters and their normalized replacements to override Algolia's default normalization. | |
attributesForFaceting | |
attributesToRetrieve | Array of strings Default: ["*"] Attributes to include in the API response. To reduce the size of your response, you can retrieve only some of the attributes. By default, the response includes all attributes. |
ranking | Array of strings Default: ["typo","geo","words","filters","proximity","attribute","exact","custom"] Determines the order in which Algolia returns your results. |
customRanking | Array of strings Default: [] Specifies the Custom ranking criterion. Use the |
relevancyStrictness | integer Default: 100 Relevancy threshold below which less relevant results aren't included in the results. |
attributesToHighlight | Array of strings Attributes to highlight. Strings that match the search query in the attributes are highlighted by surrounding them with HTML tags ( |
attributesToSnippet | Array of strings Default: [] Attributes to snippet. 'Snippeting' is shortening the attribute to a certain number of words. If not specified, the attribute is shortened to the 10 words around the matching string but you can specify the number. For example: |
highlightPreTag | string Default: "<em>" HTML string to insert before the highlighted parts in all highlight and snippet results. |
highlightPostTag | string Default: "</em>" HTML string to insert after the highlighted parts in all highlight and snippet results. |
snippetEllipsisText | string Default: "…" String used as an ellipsis indicator when a snippet is truncated. |
restrictHighlightAndSnippetArrays | boolean Default: false Restrict highlighting and snippeting to items that matched the query. |
hitsPerPage | integer (hitsPerPage) [ 1 .. 1000 ] Default: 20 Number of hits per page. |
minWordSizefor1Typo | integer Default: 4 Minimum number of characters a word in the query string must contain to accept matches with one typo. |
minWordSizefor2Typos | integer Default: 8 Minimum number of characters a word in the query string must contain to accept matches with two typos. |
boolean or typoToleranceEnum (string) (typoTolerance) Controls whether typo tolerance is enabled and how it is applied. | |
allowTyposOnNumericTokens | boolean Default: true Whether to allow typos on numbers ("numeric tokens") in the query string. |
disableTypoToleranceOnAttributes | |
Array of strings or boolean (ignorePlurals) Treats singular, plurals, and other forms of declensions as matching terms.
| |
Array of strings or boolean (removeStopWords) Removes stop (common) words from the query before executing it.
| |
keepDiacriticsOnCharacters | |
queryLanguages | Array of strings Default: [] Sets your user's search language. This adjusts language-specific settings and features such as |
decompoundQuery | |
enableRules | |
enablePersonalization | |
queryType | string (queryType) Default: "prefixLast" Enum: "prefixLast" "prefixAll" "prefixNone" Determines how query words are interpreted as prefixes. |
removeWordsIfNoResults | string (removeWordsIfNoResults) Default: "none" Enum: "none" "lastWords" "firstWords" "allOptional" Strategy to remove words from the query when it doesn't match any hits. |
mode | string (mode) Default: "keywordSearch" Enum: "neuralSearch" "keywordSearch" Search mode the index will use to query for results. |
object (semanticSearch) Settings for the semantic search part of NeuralSearch. Only used when | |
advancedSyntax | |
optionalWords | |
disableExactOnAttributes | |
exactOnSingleWordQuery | string (exactOnSingleWordQuery) Default: "attribute" Enum: "attribute" "none" "word" Determines how the Exact ranking criterion is computed when the query contains only one word. |
alternativesAsExact | Array of strings (alternativesAsExact) Default: ["ignorePlurals","singleWordSynonym"] Items Enum: "ignorePlurals" "singleWordSynonym" "multiWordsSynonym" Alternatives that should be considered an exact match by the exact ranking criterion. |
advancedSyntaxFeatures | Array of strings (advancedSyntaxFeatures) Default: ["exactPhrase","excludeWords"] Items Enum: "exactPhrase" "excludeWords" Allows you to specify which advanced syntax features are active when |
boolean or integer (distinct) | |
attributeForDistinct | string Name of the deduplication attribute to be used with Algolia's distinct feature. |
replaceSynonymsInHighlight | boolean Default: false Whether to highlight and snippet the original word that matches the synonym or the synonym itself. |
minProximity | |
responseFields | Array of strings Default: [] Attributes to include in the API response for search and browse queries. |
maxFacetHits | integer (maxFacetHits) <= 100 Default: 10 Maximum number of facet hits to return when searching for facet values. |
maxValuesPerFacet | integer Default: 100 Maximum number of facet values to return for each facet. |
sortFacetValuesBy | string Default: "count" Controls how facet values are fetched. |
attributeCriteriaComputedByMinProximity | boolean Default: false When the Attribute criterion is ranked above Proximity in your ranking formula, Proximity is used to select which searchable attribute is matched in the Attribute ranking stage. |
object (renderingContent) Extra content for the search UI, for example, to control the ordering and display of facets. You can set a default value and dynamically override it with Rules. | |
enableReRanking | |
(Array of listOfSearchFilters (Array of searchFiltersArrayString (strings) or strings or null)) or (string or null) (reRankingApplyFilter) When Dynamic Re-Ranking is enabled, only records that match these filters will be affected by Dynamic Re-Ranking. |
Responses
Request samples
- Payload
{- "replicas": [
- "virtual(prod_products_price_asc)",
- "dev_products_replica"
], - "paginationLimitedTo": 20,
- "unretrievableAttributes": [
- "popularity"
], - "disableTypoToleranceOnWords": [
- "wheel",
- "1X2BCD"
], - "attributesToTransliterate": [
- "name",
- "description"
], - "camelCaseAttributes": [
- "description"
], - "decompoundedAttributes": {
- "de": [
- "name"
]
}, - "indexLanguages": [
- "ja"
], - "disablePrefixOnAttributes": [
- "sku"
], - "allowCompressionOfIntegerArray": false,
- "numericAttributesForFiltering": [
- "quantity",
- "popularity"
], - "separatorsToIndex": "+#",
- "searchableAttributes": [
- "title,alternative_title",
- "author",
- "unordered(text)",
- "emails.personal"
], - "userData": {
- "settingID": "f2a7b51e3503acc6a39b3784ffb84300",
- "pluginVersion": "1.6.0"
}, - "customNormalization": "{default: {'ä': 'ae', 'ü': 'ue'}}\n",
- "attributesForFaceting": [
- "author",
- "filterOnly(isbn)",
- "searchable(edition)",
- "afterDistinct(category)",
- "afterDistinct(searchable(publisher))"
], - "attributesToRetrieve": [
- "author",
- "title",
- "content"
], - "ranking": [
- "typo",
- "geo",
- "words",
- "filters",
- "proximity",
- "attribute",
- "exact",
- "custom"
], - "customRanking": [
- "desc(popularity)",
- "asc(price)"
], - "relevancyStrictness": 90,
- "attributesToHighlight": [
- "author",
- "title",
- "content"
], - "attributesToSnippet": [
- "content:80",
- "description"
], - "highlightPreTag": "<em>",
- "highlightPostTag": "</em>",
- "snippetEllipsisText": "…",
- "restrictHighlightAndSnippetArrays": false,
- "hitsPerPage": 20,
- "minWordSizefor1Typo": 4,
- "minWordSizefor2Typos": 8,
- "typoTolerance": true,
- "allowTyposOnNumericTokens": true,
- "disableTypoToleranceOnAttributes": [
- "sku"
], - "ignorePlurals": [
- "ca",
- "es"
], - "removeStopWords": [
- "ca",
- "es"
], - "keepDiacriticsOnCharacters": "øé",
- "queryLanguages": [
- "es"
], - "decompoundQuery": true,
- "enableRules": true,
- "enablePersonalization": false,
- "queryType": "prefixLast",
- "removeWordsIfNoResults": "firstWords",
- "mode": "neuralSearch",
- "semanticSearch": {
- "eventSources": [
- "string"
]
}, - "advancedSyntax": false,
- "optionalWords": [
- "blue",
- "iphone case"
], - "disableExactOnAttributes": [
- "description"
], - "exactOnSingleWordQuery": "attribute",
- "alternativesAsExact": [
- "ignorePlurals",
- "singleWordSynonym"
], - "advancedSyntaxFeatures": [
- "exactPhrase",
- "excludeWords"
], - "distinct": 1,
- "attributeForDistinct": "url",
- "replaceSynonymsInHighlight": false,
- "minProximity": 1,
- "responseFields": [ ],
- "maxFacetHits": 10,
- "maxValuesPerFacet": 100,
- "sortFacetValuesBy": "count",
- "attributeCriteriaComputedByMinProximity": false,
- "renderingContent": {
- "facetOrdering": {
- "facets": {
- "order": [
- "string"
]
}, - "values": {
- "property1": {
- "order": [
- "string"
], - "sortRemainingBy": "count"
}, - "property2": {
- "order": [
- "string"
], - "sortRemainingBy": "count"
}
}
}
}, - "enableReRanking": true,
- "reRankingApplyFilter": [
- [
- "string"
]
]
}
Response samples
- 200
- 400
- 402
- 403
- 404
{- "taskID": 1514562690001,
- "updatedAt": "2023-07-04T12:49:15Z"
}
Check a task's status
Some operations, such as copying an index, will respond with a taskID
value. Use this value here to check the status of that task.
Authorizations:
path Parameters
indexName required | string Example: myIndexName Index on which to perform the request. |
taskID required | integer <int64> Example: 1506303845001 Unique task identifier. |
Responses
Response samples
- 200
- 400
- 402
- 403
- 404
{- "status": "published"
}
Copy, move, or rename an index
This operation
, copy or move, will copy or move a source index's (IndexName
) records, settings, synonyms, and rules to a destination
index.
If the destination index exists, it will be replaced, except for index-specific API keys and analytics data.
If the destination index doesn't exist, it will be created.
The choice between moving or copying an index depends on your needs. Choose:
- Move to rename an index.
- Copy to create a new index with the same records and configuration as an existing one.
Note: When considering copying or moving, be aware of the rate limitations on these processes and the impact on your analytics data.
Authorizations:
path Parameters
indexName required | string Example: myIndexName Index on which to perform the request. |
Request Body schema: application/json
operation required | string (operationType) Enum: "move" "copy" Operation to perform (move or copy). |
destination required | string (indexName) Algolia index name. |
scope | Array of strings (scopeType) Items Enum: "settings" "synonyms" "rules" This only applies to the copy operation. If you omit If you specify |
Responses
Request samples
- Payload
{- "operation": "copy",
- "destination": "products",
- "scope": [
- "settings"
]
}
Response samples
- 200
- 400
- 402
- 403
- 404
{- "taskID": 1514562690001,
- "updatedAt": "2023-07-04T12:49:15Z"
}
List indices
List indices in an Algolia application.
Authorizations:
query Parameters
page | integer or null >= 0 Default: null Returns the requested page number. The page size is determined by the |
hitsPerPage | integer Default: 100 Maximum number of hits per page. |
Responses
Response samples
- 200
- 400
- 402
- 403
- 404
{- "items": [
- {
- "name": "movies",
- "createdAt": "2022-09-19T16:36:44.471Z",
- "updatedAt": "2023-07-04T12:49:15Z",
- "entries": 100,
- "dataSize": 48450,
- "fileSize": 112927,
- "lastBuildTimeS": 3,
- "numberOfPendingTasks": 0,
- "pendingTask": false,
- "primary": "T02",
- "replicas": [
- "T02_push",
- "T2replica"
]
}
], - "nbPages": 100
}
Add or update a record
Add a record (object) to an index or replace it.
If the record doesn't contain an objectID
, Algolia automatically adds it.
If you use an existing objectID
, the existing record is replaced with the new one.
To add multiple records to your index in a single API request, use the batch
operation.
Authorizations:
path Parameters
indexName required | string Example: myIndexName Index on which to perform the request. |
Request Body schema: application/json
The Algolia record.
Responses
Request samples
- Payload
{ }
Response samples
- 200
- 400
- 402
- 403
- 404
{- "createdAt": "2023-06-29T15:15:40.747Z",
- "taskID": 1514562690001,
- "objectID": "product-1"
}
Get a record
To get more than one record, use the objects
operation.
Authorizations:
path Parameters
indexName required | string Example: myIndexName Index on which to perform the request. |
objectID required | string Example: 123 Unique record (object) identifier. |
query Parameters
attributesToRetrieve | Array of strings Attributes to include with the records in the response. This is useful to reduce the size of the API response. By default, all retrievable attributes are returned.
|
Responses
Response samples
- 200
- 400
- 402
- 403
- 404
{- "property1": "string",
- "property2": "string"
}
Add or update a record (using objectID)
If you use an existing objectID
, the existing record will be replaced with the new one.
To update only some attributes of an existing record, use the partial
operation instead.
To add multiple records to your index in a single API request, use the batch
operation.
Authorizations:
path Parameters
indexName required | string Example: myIndexName Index on which to perform the request. |
objectID required | string Example: 123 Unique record (object) identifier. |
Request Body schema: application/json
Algolia record.
Responses
Request samples
- Payload
{ }
Response samples
- 200
- 400
- 402
- 403
- 404
{- "taskID": 1514562690001,
- "updatedAt": "2023-07-04T12:49:15Z",
- "objectID": "product-1"
}
Delete a record
To delete a set of records matching a query, use the deleteByQuery
operation instead.
Authorizations:
path Parameters
indexName required | string Example: myIndexName Index on which to perform the request. |
objectID required | string Example: 123 Unique record (object) identifier. |
Responses
Response samples
- 200
- 400
- 402
- 403
- 404
{- "taskID": 1514562690001,
- "deletedAt": "2023-06-27T14:42:38.831Z"
}
Delete all records matching a query
This operation doesn't support all the query options, only its filters (numeric, facet, or tag) and geo queries. It doesn't accept empty filters or queries.
Authorizations:
path Parameters
indexName required | string Example: myIndexName Index on which to perform the request. |
Request Body schema: application/json
(Array of listOfSearchFilters (Array of searchFiltersArrayString (strings) or strings)) or string (facetFilters) | |
filters | |
(Array of listOfSearchFilters (Array of searchFiltersArrayString (strings) or strings)) or string (numericFilters) | |
(Array of listOfSearchFilters (Array of searchFiltersArrayString (strings) or strings)) or string (tagFilters) | |
aroundLatLng | string (aroundLatLng) Default: "" Search for entries around a central location, enabling a geographical search within a circular area. |
integer or aroundRadiusAll (string) (aroundRadius) Maximum radius for a geographical search (in meters). | |
insideBoundingBox | Array of numbers <double> (insideBoundingBox) [ items <double > ] Search inside a rectangular area (in geographical coordinates). |
insidePolygon | Array of numbers <double> (insidePolygon) [ items <double > ] Search inside a polygon (in geographical coordinates). |
Responses
Request samples
- Payload
{- "facetFilters": [
- "category:Book",
- "author:John Doe"
], - "filters": "(category:Book OR category:Ebook) AND _tags:published",
- "numericFilters": [
- [
- "inStock = 1",
- "deliveryDate < 1441755506"
], - "price < 1000"
], - "tagFilters": [
- [
- "Book",
- "Movie"
], - "SciFi"
], - "aroundLatLng": "40.71,-74.01",
- "aroundRadius": 1,
- "insideBoundingBox": [
- 46.650828100116044,
- 7.123046875,
- 45.17210966999772,
- 1.009765625
], - "insidePolygon": [
- 46.650828100116044,
- 7.123046875,
- 45.17210966999772,
- 1.009765625,
- 49.62625916704081,
- 4.6181640625
]
}
Response samples
- 200
- 400
- 402
- 403
- 404
{- "taskID": 1514562690001,
- "deletedAt": "2023-06-27T14:42:38.831Z"
}
Delete all records from an index
Delete the records but leave settings and index-specific API keys untouched.
Authorizations:
path Parameters
indexName required | string Example: myIndexName Index on which to perform the request. |
Responses
Response samples
- 200
- 400
- 402
- 403
- 404
{- "taskID": 1514562690001,
- "updatedAt": "2023-07-04T12:49:15Z"
}
Update record attributes
Add new attributes or update current ones in an existing record. You can use any first-level attribute but not nested attributes. If you specify a nested attribute, the engine treats it as a replacement for its first-level ancestor.
Authorizations:
path Parameters
indexName required | string Example: myIndexName Index on which to perform the request. |
objectID required | string Example: 123 Unique record (object) identifier. |
query Parameters
createIfNotExists | boolean Default: true Indicates whether to create a new record if it doesn't exist yet. |
Request Body schema: application/json
Object with attributes to update.
additional property | attribute (string) or builtInOperation (object) (attributeToUpdate) |
One of string (attribute) Value of the attribute to be updated. |
Responses
Request samples
- Payload
{- "property1": "string",
- "property2": "string"
}
Response samples
- 200
- 400
- 402
- 403
- 404
{- "taskID": 1514562690001,
- "updatedAt": "2023-07-04T12:49:15Z",
- "objectID": "product-1"
}
Batch write operations on one index
To reduce the time spent on network round trips, you can perform several write actions in a single API call. Actions are applied in the order they are specified.
The supported action
s are equivalent to the individual operations of the same name.
Authorizations:
path Parameters
indexName required | string Example: myIndexName Index on which to perform the request. |
Request Body schema: application/json
required | Array of objects (batchRequest) | ||||
Array
|
Responses
Request samples
- Payload
{- "requests": [
- {
- "action": "addObject",
- "body": {
- "name": "Betty Jane McCamey",
- "company": "Vita Foods Inc.",
- "email": "betty@mccamey.com"
}
}
]
}
Response samples
- 200
- 400
- 402
- 403
- 404
{- "taskID": 1514562690001,
- "objectIDs": [
- "record-1",
- "record-2"
]
}
Batch write operations on multiple indices
To reduce the time spent on network round trips, you can perform several write actions in a single request. It's a multi-index version of the batch
operation. Actions are applied in the order they are specified.
The supported actions are equivalent to the individual operations of the same name.
Authorizations:
Request Body schema: application/json
required | Array of objects (multipleBatchRequest) | ||||||
Array
|
Responses
Request samples
- Payload
{- "requests": [
- {
- "action": "addObject",
- "body": "{'requests':[{'action':'addObject','indexName':'contacts','body':{'name':'Betty Jane McCamey','company':'Vita Foods Inc.','email':'betty@mccamey.com'}},{'action':'addObject','indexName':'public_contacts','body':{'name':'Gayla Geimer','company': \"Ortman McCain Co','email':'gayla@geimer.com'}}]}\n",
- "indexName": "index1"
}
]
}
Response samples
- 200
- 400
- 402
- 403
- 404
{- "taskID": {
- "property1": 1514562690001,
- "property2": 1514562690001
}, - "objectIDs": [
- "record-1",
- "record-2"
]
}
Get multiple records
Retrieve one or more records, potentially from different indices, in a single API operation. Results will be received in the same order as the requests.
Authorizations:
Request Body schema: application/json
Request object.
required | Array of objects (getObjectsRequest) | ||||||
Array
|
Responses
Request samples
- Payload
{- "requests": [
- {
- "attributesToRetrieve": [
- "author",
- "title",
- "content"
], - "objectID": "8b9b7619230b1950f653b962fb0dfd6b",
- "indexName": "books"
}
]
}
Response samples
- 200
- 400
- 402
- 403
- 404
{- "results": [
- { }
]
}
Search an index
Return records that match the query.
Authorizations:
path Parameters
indexName required | string Example: myIndexName Index on which to perform the request. |
Request Body schema: application/json
params | string (paramsAsString) Default: "" Search parameters as a URL-encoded query string. |
Responses
Request samples
- Payload
{- "params": "hitsPerPage=2&getRankingInfo=1"
}
Response samples
- 200
- 400
- 402
- 403
- 404
{- "abTestID": 0,
- "abTestVariantID": 1,
- "aroundLatLng": "40.71,-74.01",
- "automaticRadius": "string",
- "exhaustiveFacetsCount": true,
- "exhaustiveNbHits": true,
- "exhaustiveTypo": true,
- "facets": {
- "category": {
- "food": 1,
- "tech": 42
}
}, - "facets_stats": {
- "property1": {
- "min": 0,
- "max": 0,
- "avg": 0,
- "sum": 0
}, - "property2": {
- "min": 0,
- "max": 0,
- "avg": 0,
- "sum": 0
}
}, - "hitsPerPage": 20,
- "index": "indexName",
- "indexUsed": "indexNameAlt",
- "message": "string",
- "nbHits": 20,
- "nbPages": 1,
- "nbSortedHits": 20,
- "page": 0,
- "redirect": {
- "index": [
- {
- "source": "string",
- "dest": "string",
- "reason": "string",
- "succeed": true,
- "data": {
- "ruleObjectID": "string"
}
}
]
}, - "parsedQuery": "george clo",
- "processingTimeMS": 20,
- "queryAfterRemoval": "string",
- "serverUsed": "c2-uk-3.algolia.net",
- "userData": {
- "settingID": "f2a7b51e3503acc6a39b3784ffb84300",
- "pluginVersion": "1.6.0"
}, - "renderingContent": {
- "facetOrdering": {
- "facets": {
- "order": [
- "string"
]
}, - "values": {
- "property1": {
- "order": [
- "string"
], - "sortRemainingBy": "count"
}, - "property2": {
- "order": [
- "string"
], - "sortRemainingBy": "count"
}
}
}
}, - "hits": [
- {
- "objectID": "product-1",
- "_highlightResult": {
- "property1": {
- "value": "<em>George</em> <em>Clo</em>oney",
- "matchLevel": "none",
- "matchedWords": [
- "action"
], - "fullyHighlighted": true
}, - "property2": {
- "value": "<em>George</em> <em>Clo</em>oney",
- "matchLevel": "none",
- "matchedWords": [
- "action"
], - "fullyHighlighted": true
}
}, - "_snippetResult": {
- "property1": {
- "value": "<em>George</em> <em>Clo</em>oney",
- "matchLevel": "none"
}, - "property2": {
- "value": "<em>George</em> <em>Clo</em>oney",
- "matchLevel": "none"
}
}, - "_rankingInfo": {
- "filters": 0,
- "firstMatchedWord": 0,
- "geoDistance": 0,
- "geoPrecision": 0,
- "matchedGeoLocation": {
- "lat": 0,
- "lng": 0,
- "distance": 0
}, - "personalization": {
- "filtersScore": 0,
- "rankingScore": 0,
- "score": 0
}, - "nbExactWords": 0,
- "nbTypos": 0,
- "promoted": true,
- "proximityDistance": 0,
- "userScore": 0,
- "words": 0,
- "promotedByReRanking": true
}, - "_distinctSeqID": 0
}
], - "query": "",
- "params": "query=a&hitsPerPage=20"
}
Search multiple indices
Send multiple search queries to one or more indices.
Authorizations:
Request Body schema: application/json
Query requests and strategies. Results will be received in the same order as the queries.
required | Array of (SearchForHits (searchParamsString (object) or baseSearchParams (object))) or (SearchForFacets (searchParamsString (object) or baseSearchParams (object))) (SearchQuery) |
strategy | string (searchStrategy) Enum: "none" "stopIfEnoughMatches"
|
Responses
Request samples
- Payload
{- "requests": [
- {
- "params": "hitsPerPage=2&getRankingInfo=1",
- "indexName": "products",
- "type": "default"
}
], - "strategy": "none"
}
Response samples
- 200
- 400
- 402
- 403
- 404
{- "results": [
- {
- "abTestID": 0,
- "abTestVariantID": 1,
- "aroundLatLng": "40.71,-74.01",
- "automaticRadius": "string",
- "exhaustiveFacetsCount": true,
- "exhaustiveNbHits": true,
- "exhaustiveTypo": true,
- "facets": {
- "category": {
- "food": 1,
- "tech": 42
}
}, - "facets_stats": {
- "property1": {
- "min": 0,
- "max": 0,
- "avg": 0,
- "sum": 0
}, - "property2": {
- "min": 0,
- "max": 0,
- "avg": 0,
- "sum": 0
}
}, - "hitsPerPage": 20,
- "index": "indexName",
- "indexUsed": "indexNameAlt",
- "message": "string",
- "nbHits": 20,
- "nbPages": 1,
- "nbSortedHits": 20,
- "page": 0,
- "redirect": {
- "index": [
- {
- "source": "string",
- "dest": "string",
- "reason": "string",
- "succeed": true,
- "data": {
- "ruleObjectID": "string"
}
}
]
}, - "parsedQuery": "george clo",
- "processingTimeMS": 20,
- "queryAfterRemoval": "string",
- "serverUsed": "c2-uk-3.algolia.net",
- "userData": {
- "settingID": "f2a7b51e3503acc6a39b3784ffb84300",
- "pluginVersion": "1.6.0"
}, - "renderingContent": {
- "facetOrdering": {
- "facets": {
- "order": [
- "string"
]
}, - "values": {
- "property1": {
- "order": [
- "string"
], - "sortRemainingBy": "count"
}, - "property2": {
- "order": [
- "string"
], - "sortRemainingBy": "count"
}
}
}
}, - "hits": [
- {
- "objectID": "product-1",
- "_highlightResult": {
- "property1": {
- "value": "<em>George</em> <em>Clo</em>oney",
- "matchLevel": "none",
- "matchedWords": [
- "action"
], - "fullyHighlighted": true
}, - "property2": {
- "value": "<em>George</em> <em>Clo</em>oney",
- "matchLevel": "none",
- "matchedWords": [
- "action"
], - "fullyHighlighted": true
}
}, - "_snippetResult": {
- "property1": {
- "value": "<em>George</em> <em>Clo</em>oney",
- "matchLevel": "none"
}, - "property2": {
- "value": "<em>George</em> <em>Clo</em>oney",
- "matchLevel": "none"
}
}, - "_rankingInfo": {
- "filters": 0,
- "firstMatchedWord": 0,
- "geoDistance": 0,
- "geoPrecision": 0,
- "matchedGeoLocation": {
- "lat": 0,
- "lng": 0,
- "distance": 0
}, - "personalization": {
- "filtersScore": 0,
- "rankingScore": 0,
- "score": 0
}, - "nbExactWords": 0,
- "nbTypos": 0,
- "promoted": true,
- "proximityDistance": 0,
- "userScore": 0,
- "words": 0,
- "promotedByReRanking": true
}, - "_distinctSeqID": 0
}
], - "query": "",
- "params": "query=a&hitsPerPage=20"
}
]
}
Search for facet values
Search for a facet's values, optionally restricting the returned values to those contained in records matching other search criteria.
Note: Pagination isn't supported (
page
andhitsPerPage
are ignored). By default, the engine returns a maximum of 10 values but you can adjust this withmaxFacetHits
.
Authorizations:
path Parameters
indexName required | string Example: myIndexName Index on which to perform the request. |
facetName required | string Facet name. |
Request Body schema: application/json
params | string (paramsAsString) Default: "" Search parameters as a URL-encoded query string. |
facetQuery | string (facetQuery) Default: "" Text to search inside the facet's values. |
maxFacetHits | integer (maxFacetHits) <= 100 Default: 10 Maximum number of facet hits to return when searching for facet values. |
Responses
Request samples
- Payload
{- "params": "hitsPerPage=2&getRankingInfo=1",
- "facetQuery": "george",
- "maxFacetHits": 10
}
Response samples
- 200
- 400
- 402
- 403
- 404
{- "facetHits": [
- {
- "value": "Mobile phone",
- "highlighted": "<em>George</em> <em>Clo</em>oney",
- "count": 0
}
]
}
Get all records from an index
Retrieve up to 1,000 records per call. Supports full-text search and filters. For better performance, it doesn't support:
- The
distinct
query parameter - Sorting by typos, proximity, words, or geographical distance.
Authorizations:
path Parameters
indexName required | string Example: myIndexName Index on which to perform the request. |
Request Body schema: application/json
params | string (paramsAsString) Default: "" Search parameters as a URL-encoded query string. |
Responses
Request samples
- Payload
{- "params": "hitsPerPage=2&getRankingInfo=1"
}
Response samples
- 200
- 400
- 402
- 403
- 404
{- "abTestID": 0,
- "abTestVariantID": 1,
- "aroundLatLng": "40.71,-74.01",
- "automaticRadius": "string",
- "exhaustiveFacetsCount": true,
- "exhaustiveNbHits": true,
- "exhaustiveTypo": true,
- "facets": {
- "category": {
- "food": 1,
- "tech": 42
}
}, - "facets_stats": {
- "property1": {
- "min": 0,
- "max": 0,
- "avg": 0,
- "sum": 0
}, - "property2": {
- "min": 0,
- "max": 0,
- "avg": 0,
- "sum": 0
}
}, - "hitsPerPage": 20,
- "index": "indexName",
- "indexUsed": "indexNameAlt",
- "message": "string",
- "nbHits": 20,
- "nbPages": 1,
- "nbSortedHits": 20,
- "page": 0,
- "redirect": {
- "index": [
- {
- "source": "string",
- "dest": "string",
- "reason": "string",
- "succeed": true,
- "data": {
- "ruleObjectID": "string"
}
}
]
}, - "parsedQuery": "george clo",
- "processingTimeMS": 20,
- "queryAfterRemoval": "string",
- "serverUsed": "c2-uk-3.algolia.net",
- "userData": {
- "settingID": "f2a7b51e3503acc6a39b3784ffb84300",
- "pluginVersion": "1.6.0"
}, - "renderingContent": {
- "facetOrdering": {
- "facets": {
- "order": [
- "string"
]
}, - "values": {
- "property1": {
- "order": [
- "string"
], - "sortRemainingBy": "count"
}, - "property2": {
- "order": [
- "string"
], - "sortRemainingBy": "count"
}
}
}
}, - "hits": [
- {
- "objectID": "product-1",
- "_highlightResult": {
- "property1": {
- "value": "<em>George</em> <em>Clo</em>oney",
- "matchLevel": "none",
- "matchedWords": [
- "action"
], - "fullyHighlighted": true
}, - "property2": {
- "value": "<em>George</em> <em>Clo</em>oney",
- "matchLevel": "none",
- "matchedWords": [
- "action"
], - "fullyHighlighted": true
}
}, - "_snippetResult": {
- "property1": {
- "value": "<em>George</em> <em>Clo</em>oney",
- "matchLevel": "none"
}, - "property2": {
- "value": "<em>George</em> <em>Clo</em>oney",
- "matchLevel": "none"
}
}, - "_rankingInfo": {
- "filters": 0,
- "firstMatchedWord": 0,
- "geoDistance": 0,
- "geoPrecision": 0,
- "matchedGeoLocation": {
- "lat": 0,
- "lng": 0,
- "distance": 0
}, - "personalization": {
- "filtersScore": 0,
- "rankingScore": 0,
- "score": 0
}, - "nbExactWords": 0,
- "nbTypos": 0,
- "promoted": true,
- "proximityDistance": 0,
- "userScore": 0,
- "words": 0,
- "promotedByReRanking": true
}, - "_distinctSeqID": 0
}
], - "query": "",
- "params": "query=a&hitsPerPage=20",
- "cursor": "jMDY3M2MwM2QwMWUxMmQwYWI0ZTN"
}
Get a rule
Get a rule by its objectID
. To find the objectID
for rules, use the search
operation.
Authorizations:
path Parameters
indexName required | string Example: myIndexName Index on which to perform the request. |
objectID required | string Example: a-rule-id Unique identifier of a rule object. |
Responses
Response samples
- 200
- 400
- 402
- 403
- 404
{- "objectID": "hide-12345",
- "conditions": [
- {
- "pattern": "{facet:brand}",
- "anchoring": "is",
- "alternatives": false,
- "context": "trackedFilters"
}
], - "consequence": {
- "params": {
- "similarQuery": "",
- "filters": "(category:Book OR category:Ebook) AND _tags:published",
- "facetFilters": [
- "category:Book",
- "author:John Doe"
], - "optionalFilters": [
- "category:Book",
- "author:John Doe"
], - "numericFilters": [
- [
- "inStock = 1",
- "deliveryDate < 1441755506"
], - "price < 1000"
], - "tagFilters": [
- [
- "Book",
- "Movie"
], - "SciFi"
], - "sumOrFiltersScores": false,
- "restrictSearchableAttributes": [
- "title",
- "author"
], - "facets": [ ],
- "facetingAfterDistinct": false,
- "page": 0,
- "offset": 0,
- "length": 1,
- "aroundLatLng": "40.71,-74.01",
- "aroundLatLngViaIP": false,
- "aroundRadius": 1,
- "aroundPrecision": 10,
- "minimumAroundRadius": 1,
- "insideBoundingBox": [
- 46.650828100116044,
- 7.123046875,
- 45.17210966999772,
- 1.009765625
], - "insidePolygon": [
- 46.650828100116044,
- 7.123046875,
- 45.17210966999772,
- 1.009765625,
- 49.62625916704081,
- 4.6181640625
], - "naturalLanguages": [ ],
- "ruleContexts": [ ],
- "personalizationImpact": 100,
- "userToken": "123456",
- "getRankingInfo": false,
- "explain": [ ],
- "synonyms": true,
- "clickAnalytics": false,
- "analytics": true,
- "analyticsTags": [ ],
- "percentileComputation": true,
- "enableABTest": true,
- "attributesForFaceting": [
- "author",
- "filterOnly(isbn)",
- "searchable(edition)",
- "afterDistinct(category)",
- "afterDistinct(searchable(publisher))"
], - "attributesToRetrieve": [
- "author",
- "title",
- "content"
], - "ranking": [
- "typo",
- "geo",
- "words",
- "filters",
- "proximity",
- "attribute",
- "exact",
- "custom"
], - "customRanking": [
- "desc(popularity)",
- "asc(price)"
], - "relevancyStrictness": 90,
- "attributesToHighlight": [
- "author",
- "title",
- "content"
], - "attributesToSnippet": [
- "content:80",
- "description"
], - "highlightPreTag": "<em>",
- "highlightPostTag": "</em>",
- "snippetEllipsisText": "…",
- "restrictHighlightAndSnippetArrays": false,
- "hitsPerPage": 20,
- "minWordSizefor1Typo": 4,
- "minWordSizefor2Typos": 8,
- "typoTolerance": true,
- "allowTyposOnNumericTokens": true,
- "disableTypoToleranceOnAttributes": [
- "sku"
], - "ignorePlurals": [
- "ca",
- "es"
], - "removeStopWords": [
- "ca",
- "es"
], - "keepDiacriticsOnCharacters": "øé",
- "queryLanguages": [
- "es"
], - "decompoundQuery": true,
- "enableRules": true,
- "enablePersonalization": false,
- "queryType": "prefixLast",
- "removeWordsIfNoResults": "firstWords",
- "mode": "neuralSearch",
- "semanticSearch": {
- "eventSources": [
- "string"
]
}, - "advancedSyntax": false,
- "optionalWords": [
- "blue",
- "iphone case"
], - "disableExactOnAttributes": [
- "description"
], - "exactOnSingleWordQuery": "attribute",
- "alternativesAsExact": [
- "ignorePlurals",
- "singleWordSynonym"
], - "advancedSyntaxFeatures": [
- "exactPhrase",
- "excludeWords"
], - "distinct": 1,
- "attributeForDistinct": "url",
- "replaceSynonymsInHighlight": false,
- "minProximity": 1,
- "responseFields": [ ],
- "maxFacetHits": 10,
- "maxValuesPerFacet": 100,
- "sortFacetValuesBy": "count",
- "attributeCriteriaComputedByMinProximity": false,
- "renderingContent": {
- "facetOrdering": {
- "facets": {
- "order": [
- "string"
]
}, - "values": {
- "property1": {
- "order": [
- "string"
], - "sortRemainingBy": "count"
}, - "property2": {
- "order": [
- "string"
], - "sortRemainingBy": "count"
}
}
}
}, - "enableReRanking": true,
- "reRankingApplyFilter": [
- [
- "string"
]
], - "query": {
- "remove": [
- "string"
], - "edits": [
- {
- "type": "remove",
- "delete": "string",
- "insert": "string"
}
]
}, - "automaticFacetFilters": [
- {
- "facet": "string",
- "score": 1,
- "disjunctive": false
}
], - "automaticOptionalFacetFilters": [
- {
- "facet": "string",
- "score": 1,
- "disjunctive": false
}
]
}, - "promote": [
- {
- "objectIDs": [
- "3f31c087763a2ceec359b318fc3edef3",
- "63c3c871e31a152d67df7720192fd752"
], - "position": 0
}
], - "filterPromotes": false,
- "hide": [
- {
- "objectID": "product-1"
}
], - "userData": {
- "settingID": "f2a7b51e3503acc6a39b3784ffb84300",
- "pluginVersion": "1.6.0"
}
}, - "description": "Display a promotional banner",
- "enabled": true,
- "validity": [
- {
- "from": 0,
- "until": 0
}
]
}
Create or update a rule
To create or update more than one rule, use the batch
operation.
Authorizations:
path Parameters
indexName required | string Example: myIndexName Index on which to perform the request. |
objectID required | string Example: a-rule-id Unique identifier of a rule object. |
query Parameters
forwardToReplicas | boolean Indicates whether changed index settings are forwarded to the replica indices. |
Request Body schema: application/json
objectID required | string Unique identifier for a rule object. |
Array of objects (condition) Conditions required to activate a rule. You can use up to 25 conditions per rule. | |
object (consequence) Consequences of a rule. | |
description | string Description of the rule's purpose. This can be helpful for display in the Algolia dashboard. |
enabled | boolean Default: true Indicates whether to enable the rule. If it isn't enabled, it isn't applied at query time. |
Array of objects (timeRange) If you specify a validity period, the rule only applies only during that period. If specified, the array must not be empty. |
Responses
Request samples
- Payload
{- "objectID": "hide-12345",
- "conditions": [
- {
- "pattern": "{facet:brand}",
- "anchoring": "is",
- "alternatives": false,
- "context": "trackedFilters"
}
], - "consequence": {
- "params": {
- "similarQuery": "",
- "filters": "(category:Book OR category:Ebook) AND _tags:published",
- "facetFilters": [
- "category:Book",
- "author:John Doe"
], - "optionalFilters": [
- "category:Book",
- "author:John Doe"
], - "numericFilters": [
- [
- "inStock = 1",
- "deliveryDate < 1441755506"
], - "price < 1000"
], - "tagFilters": [
- [
- "Book",
- "Movie"
], - "SciFi"
], - "sumOrFiltersScores": false,
- "restrictSearchableAttributes": [
- "title",
- "author"
], - "facets": [ ],
- "facetingAfterDistinct": false,
- "page": 0,
- "offset": 0,
- "length": 1,
- "aroundLatLng": "40.71,-74.01",
- "aroundLatLngViaIP": false,
- "aroundRadius": 1,
- "aroundPrecision": 10,
- "minimumAroundRadius": 1,
- "insideBoundingBox": [
- 46.650828100116044,
- 7.123046875,
- 45.17210966999772,
- 1.009765625
], - "insidePolygon": [
- 46.650828100116044,
- 7.123046875,
- 45.17210966999772,
- 1.009765625,
- 49.62625916704081,
- 4.6181640625
], - "naturalLanguages": [ ],
- "ruleContexts": [ ],
- "personalizationImpact": 100,
- "userToken": "123456",
- "getRankingInfo": false,
- "explain": [ ],
- "synonyms": true,
- "clickAnalytics": false,
- "analytics": true,
- "analyticsTags": [ ],
- "percentileComputation": true,
- "enableABTest": true,
- "attributesForFaceting": [
- "author",
- "filterOnly(isbn)",
- "searchable(edition)",
- "afterDistinct(category)",
- "afterDistinct(searchable(publisher))"
], - "attributesToRetrieve": [
- "author",
- "title",
- "content"
], - "ranking": [
- "typo",
- "geo",
- "words",
- "filters",
- "proximity",
- "attribute",
- "exact",
- "custom"
], - "customRanking": [
- "desc(popularity)",
- "asc(price)"
], - "relevancyStrictness": 90,
- "attributesToHighlight": [
- "author",
- "title",
- "content"
], - "attributesToSnippet": [
- "content:80",
- "description"
], - "highlightPreTag": "<em>",
- "highlightPostTag": "</em>",
- "snippetEllipsisText": "…",
- "restrictHighlightAndSnippetArrays": false,
- "hitsPerPage": 20,
- "minWordSizefor1Typo": 4,
- "minWordSizefor2Typos": 8,
- "typoTolerance": true,
- "allowTyposOnNumericTokens": true,
- "disableTypoToleranceOnAttributes": [
- "sku"
], - "ignorePlurals": [
- "ca",
- "es"
], - "removeStopWords": [
- "ca",
- "es"
], - "keepDiacriticsOnCharacters": "øé",
- "queryLanguages": [
- "es"
], - "decompoundQuery": true,
- "enableRules": true,
- "enablePersonalization": false,
- "queryType": "prefixLast",
- "removeWordsIfNoResults": "firstWords",
- "mode": "neuralSearch",
- "semanticSearch": {
- "eventSources": [
- "string"
]
}, - "advancedSyntax": false,
- "optionalWords": [
- "blue",
- "iphone case"
], - "disableExactOnAttributes": [
- "description"
], - "exactOnSingleWordQuery": "attribute",
- "alternativesAsExact": [
- "ignorePlurals",
- "singleWordSynonym"
], - "advancedSyntaxFeatures": [
- "exactPhrase",
- "excludeWords"
], - "distinct": 1,
- "attributeForDistinct": "url",
- "replaceSynonymsInHighlight": false,
- "minProximity": 1,
- "responseFields": [ ],
- "maxFacetHits": 10,
- "maxValuesPerFacet": 100,
- "sortFacetValuesBy": "count",
- "attributeCriteriaComputedByMinProximity": false,
- "renderingContent": {
- "facetOrdering": {
- "facets": {
- "order": [
- "string"
]
}, - "values": {
- "property1": {
- "order": [
- "string"
], - "sortRemainingBy": "count"
}, - "property2": {
- "order": [
- "string"
], - "sortRemainingBy": "count"
}
}
}
}, - "enableReRanking": true,
- "reRankingApplyFilter": [
- [
- "string"
]
], - "query": {
- "remove": [
- "string"
], - "edits": [
- {
- "type": "remove",
- "delete": "string",
- "insert": "string"
}
]
}, - "automaticFacetFilters": [
- {
- "facet": "string",
- "score": 1,
- "disjunctive": false
}
], - "automaticOptionalFacetFilters": [
- {
- "facet": "string",
- "score": 1,
- "disjunctive": false
}
]
}, - "promote": [
- {
- "objectIDs": [
- "3f31c087763a2ceec359b318fc3edef3",
- "63c3c871e31a152d67df7720192fd752"
], - "position": 0
}
], - "filterPromotes": false,
- "hide": [
- {
- "objectID": "product-1"
}
], - "userData": {
- "settingID": "f2a7b51e3503acc6a39b3784ffb84300",
- "pluginVersion": "1.6.0"
}
}, - "description": "Display a promotional banner",
- "enabled": true,
- "validity": [
- {
- "from": 0,
- "until": 0
}
]
}
Response samples
- 200
- 400
- 402
- 403
- 404
{- "objectID": "product-1",
- "updatedAt": "2023-07-04T12:49:15Z",
- "taskID": 1514562690001
}
Delete a rule
Delete a rule by its objectID
. To find the objectID
for rules, use the search
operation.
Authorizations:
path Parameters
indexName required | string Example: myIndexName Index on which to perform the request. |
objectID required | string Example: a-rule-id Unique identifier of a rule object. |
query Parameters
forwardToReplicas | boolean Indicates whether changed index settings are forwarded to the replica indices. |
Responses
Response samples
- 200
- 400
- 402
- 403
- 404
{- "taskID": 1514562690001,
- "updatedAt": "2023-07-04T12:49:15Z"
}
Save a batch of rules
Create or update multiple rules.
Authorizations:
path Parameters
indexName required | string Example: myIndexName Index on which to perform the request. |
query Parameters
forwardToReplicas | boolean Indicates whether changed index settings are forwarded to the replica indices. |
clearExistingRules | boolean Indicates whether existing rules should be deleted before adding this batch. |
Request Body schema: application/json
objectID required | string Unique identifier for a rule object. |
Array of objects (condition) Conditions required to activate a rule. You can use up to 25 conditions per rule. | |
object (consequence) Consequences of a rule. | |
description | string Description of the rule's purpose. This can be helpful for display in the Algolia dashboard. |
enabled | boolean Default: true Indicates whether to enable the rule. If it isn't enabled, it isn't applied at query time. |
Array of objects (timeRange) If you specify a validity period, the rule only applies only during that period. If specified, the array must not be empty. |
Responses
Request samples
- Payload
[- {
- "objectID": "hide-12345",
- "conditions": [
- {
- "pattern": "{facet:brand}",
- "anchoring": "is",
- "alternatives": false,
- "context": "trackedFilters"
}
], - "consequence": {
- "params": {
- "similarQuery": "",
- "filters": "(category:Book OR category:Ebook) AND _tags:published",
- "facetFilters": [
- "category:Book",
- "author:John Doe"
], - "optionalFilters": [
- "category:Book",
- "author:John Doe"
], - "numericFilters": [
- [
- "inStock = 1",
- "deliveryDate < 1441755506"
], - "price < 1000"
], - "tagFilters": [
- [
- "Book",
- "Movie"
], - "SciFi"
], - "sumOrFiltersScores": false,
- "restrictSearchableAttributes": [
- "title",
- "author"
], - "facets": [ ],
- "facetingAfterDistinct": false,
- "page": 0,
- "offset": 0,
- "length": 1,
- "aroundLatLng": "40.71,-74.01",
- "aroundLatLngViaIP": false,
- "aroundRadius": 1,
- "aroundPrecision": 10,
- "minimumAroundRadius": 1,
- "insideBoundingBox": [
- 46.650828100116044,
- 7.123046875,
- 45.17210966999772,
- 1.009765625
], - "insidePolygon": [
- 46.650828100116044,
- 7.123046875,
- 45.17210966999772,
- 1.009765625,
- 49.62625916704081,
- 4.6181640625
], - "naturalLanguages": [ ],
- "ruleContexts": [ ],
- "personalizationImpact": 100,
- "userToken": "123456",
- "getRankingInfo": false,
- "explain": [ ],
- "synonyms": true,
- "clickAnalytics": false,
- "analytics": true,
- "analyticsTags": [ ],
- "percentileComputation": true,
- "enableABTest": true,
- "attributesForFaceting": [
- "author",
- "filterOnly(isbn)",
- "searchable(edition)",
- "afterDistinct(category)",
- "afterDistinct(searchable(publisher))"
], - "attributesToRetrieve": [
- "author",
- "title",
- "content"
], - "ranking": [
- "typo",
- "geo",
- "words",
- "filters",
- "proximity",
- "attribute",
- "exact",
- "custom"
], - "customRanking": [
- "desc(popularity)",
- "asc(price)"
], - "relevancyStrictness": 90,
- "attributesToHighlight": [
- "author",
- "title",
- "content"
], - "attributesToSnippet": [
- "content:80",
- "description"
], - "highlightPreTag": "<em>",
- "highlightPostTag": "</em>",
- "snippetEllipsisText": "…",
- "restrictHighlightAndSnippetArrays": false,
- "hitsPerPage": 20,
- "minWordSizefor1Typo": 4,
- "minWordSizefor2Typos": 8,
- "typoTolerance": true,
- "allowTyposOnNumericTokens": true,
- "disableTypoToleranceOnAttributes": [
- "sku"
], - "ignorePlurals": [
- "ca",
- "es"
], - "removeStopWords": [
- "ca",
- "es"
], - "keepDiacriticsOnCharacters": "øé",
- "queryLanguages": [
- "es"
], - "decompoundQuery": true,
- "enableRules": true,
- "enablePersonalization": false,
- "queryType": "prefixLast",
- "removeWordsIfNoResults": "firstWords",
- "mode": "neuralSearch",
- "semanticSearch": {
- "eventSources": [
- "string"
]
}, - "advancedSyntax": false,
- "optionalWords": [
- "blue",
- "iphone case"
], - "disableExactOnAttributes": [
- "description"
], - "exactOnSingleWordQuery": "attribute",
- "alternativesAsExact": [
- "ignorePlurals",
- "singleWordSynonym"
], - "advancedSyntaxFeatures": [
- "exactPhrase",
- "excludeWords"
], - "distinct": 1,
- "attributeForDistinct": "url",
- "replaceSynonymsInHighlight": false,
- "minProximity": 1,
- "responseFields": [ ],
- "maxFacetHits": 10,
- "maxValuesPerFacet": 100,
- "sortFacetValuesBy": "count",
- "attributeCriteriaComputedByMinProximity": false,
- "renderingContent": {
- "facetOrdering": {
- "facets": {
- "order": [
- "string"
]
}, - "values": {
- "property1": {
- "order": [
- "string"
], - "sortRemainingBy": "count"
}, - "property2": {
- "order": [
- "string"
], - "sortRemainingBy": "count"
}
}
}
}, - "enableReRanking": true,
- "reRankingApplyFilter": [
- [
- "string"
]
], - "query": {
- "remove": [
- "string"
], - "edits": [
- {
- "type": "remove",
- "delete": "string",
- "insert": "string"
}
]
}, - "automaticFacetFilters": [
- {
- "facet": "string",
- "score": 1,
- "disjunctive": false
}
], - "automaticOptionalFacetFilters": [
- {
- "facet": "string",
- "score": 1,
- "disjunctive": false
}
]
}, - "promote": [
- {
- "objectIDs": [
- "3f31c087763a2ceec359b318fc3edef3",
- "63c3c871e31a152d67df7720192fd752"
], - "position": 0
}
], - "filterPromotes": false,
- "hide": [
- {
- "objectID": "product-1"
}
], - "userData": {
- "settingID": "f2a7b51e3503acc6a39b3784ffb84300",
- "pluginVersion": "1.6.0"
}
}, - "description": "Display a promotional banner",
- "enabled": true,
- "validity": [
- {
- "from": 0,
- "until": 0
}
]
}
]
Response samples
- 200
- 400
- 402
- 403
- 404
{- "taskID": 1514562690001,
- "updatedAt": "2023-07-04T12:49:15Z"
}
Delete all rules
Delete all rules in the index.
Authorizations:
path Parameters
indexName required | string Example: myIndexName Index on which to perform the request. |
query Parameters
forwardToReplicas | boolean Indicates whether changed index settings are forwarded to the replica indices. |
Responses
Response samples
- 200
- 400
- 402
- 403
- 404
{- "taskID": 1514562690001,
- "updatedAt": "2023-07-04T12:49:15Z"
}
Search for rules
Search for rules in your index. You can control the search with parameters. To list all rules, send an empty request body.
Authorizations:
path Parameters
indexName required | string Example: myIndexName Index on which to perform the request. |
Request Body schema: application/json
query | string (parameters_query) Default: "" Rule object query. |
anchoring | string (anchoring) Enum: "is" "startsWith" "endsWith" "contains" Whether the pattern parameter matches the beginning ( |
context | string Restricts responses to the specified contextual rule. |
page | integer (parameters_page) >= 0 Requested page (the first page is page 0). |
hitsPerPage | integer (parameters_hitsPerPage) [ 1 .. 1000 ] Default: 20 Maximum number of hits per page. |
enabled | boolean or null Default: null Restricts responses to enabled rules. When not specified (default), all rules are retrieved. |
requestOptions | Array of objects Request options to send with the API call. |
Responses
Request samples
- Payload
{- "query": "",
- "anchoring": "is",
- "context": "mobile",
- "page": 0,
- "hitsPerPage": 20,
- "enabled": null,
- "requestOptions": "{timeouts:{read:20}}\n"
}
Response samples
- 200
- 400
- 402
- 403
- 404
{- "hits": [
- {
- "objectID": "hide-12345",
- "conditions": [
- {
- "pattern": "{facet:brand}",
- "anchoring": "is",
- "alternatives": false,
- "context": "trackedFilters"
}
], - "consequence": {
- "params": {
- "similarQuery": "",
- "filters": "(category:Book OR category:Ebook) AND _tags:published",
- "facetFilters": [
- "category:Book",
- "author:John Doe"
], - "optionalFilters": [
- "category:Book",
- "author:John Doe"
], - "numericFilters": [
- [
- "inStock = 1",
- "deliveryDate < 1441755506"
], - "price < 1000"
], - "tagFilters": [
- [
- "Book",
- "Movie"
], - "SciFi"
], - "sumOrFiltersScores": false,
- "restrictSearchableAttributes": [
- "title",
- "author"
], - "facets": [ ],
- "facetingAfterDistinct": false,
- "page": 0,
- "offset": 0,
- "length": 1,
- "aroundLatLng": "40.71,-74.01",
- "aroundLatLngViaIP": false,
- "aroundRadius": 1,
- "aroundPrecision": 10,
- "minimumAroundRadius": 1,
- "insideBoundingBox": [
- 46.650828100116044,
- 7.123046875,
- 45.17210966999772,
- 1.009765625
], - "insidePolygon": [
- 46.650828100116044,
- 7.123046875,
- 45.17210966999772,
- 1.009765625,
- 49.62625916704081,
- 4.6181640625
], - "naturalLanguages": [ ],
- "ruleContexts": [ ],
- "personalizationImpact": 100,
- "userToken": "123456",
- "getRankingInfo": false,
- "explain": [ ],
- "synonyms": true,
- "clickAnalytics": false,
- "analytics": true,
- "analyticsTags": [ ],
- "percentileComputation": true,
- "enableABTest": true,
- "attributesForFaceting": [
- "author",
- "filterOnly(isbn)",
- "searchable(edition)",
- "afterDistinct(category)",
- "afterDistinct(searchable(publisher))"
], - "attributesToRetrieve": [
- "author",
- "title",
- "content"
], - "ranking": [
- "typo",
- "geo",
- "words",
- "filters",
- "proximity",
- "attribute",
- "exact",
- "custom"
], - "customRanking": [
- "desc(popularity)",
- "asc(price)"
], - "relevancyStrictness": 90,
- "attributesToHighlight": [
- "author",
- "title",
- "content"
], - "attributesToSnippet": [
- "content:80",
- "description"
], - "highlightPreTag": "<em>",
- "highlightPostTag": "</em>",
- "snippetEllipsisText": "…",
- "restrictHighlightAndSnippetArrays": false,
- "hitsPerPage": 20,
- "minWordSizefor1Typo": 4,
- "minWordSizefor2Typos": 8,
- "typoTolerance": true,
- "allowTyposOnNumericTokens": true,
- "disableTypoToleranceOnAttributes": [
- "sku"
], - "ignorePlurals": [
- "ca",
- "es"
], - "removeStopWords": [
- "ca",
- "es"
], - "keepDiacriticsOnCharacters": "øé",
- "queryLanguages": [
- "es"
], - "decompoundQuery": true,
- "enableRules": true,
- "enablePersonalization": false,
- "queryType": "prefixLast",
- "removeWordsIfNoResults": "firstWords",
- "mode": "neuralSearch",
- "semanticSearch": {
- "eventSources": [
- "string"
]
}, - "advancedSyntax": false,
- "optionalWords": [
- "blue",
- "iphone case"
], - "disableExactOnAttributes": [
- "description"
], - "exactOnSingleWordQuery": "attribute",
- "alternativesAsExact": [
- "ignorePlurals",
- "singleWordSynonym"
], - "advancedSyntaxFeatures": [
- "exactPhrase",
- "excludeWords"
], - "distinct": 1,
- "attributeForDistinct": "url",
- "replaceSynonymsInHighlight": false,
- "minProximity": 1,
- "responseFields": [ ],
- "maxFacetHits": 10,
- "maxValuesPerFacet": 100,
- "sortFacetValuesBy": "count",
- "attributeCriteriaComputedByMinProximity": false,
- "renderingContent": {
- "facetOrdering": {
- "facets": {
- "order": [
- "string"
]
}, - "values": {
- "property1": {
- "order": [
- null
], - "sortRemainingBy": "count"
}, - "property2": {
- "order": [
- null
], - "sortRemainingBy": "count"
}
}
}
}, - "enableReRanking": true,
- "reRankingApplyFilter": [
- [
- "string"
]
], - "query": {
- "remove": [
- "string"
], - "edits": [
- {
- "type": "remove",
- "delete": "string",
- "insert": "string"
}
]
}, - "automaticFacetFilters": [
- {
- "facet": "string",
- "score": 1,
- "disjunctive": false
}
], - "automaticOptionalFacetFilters": [
- {
- "facet": "string",
- "score": 1,
- "disjunctive": false
}
]
}, - "promote": [
- {
- "objectIDs": [
- "3f31c087763a2ceec359b318fc3edef3",
- "63c3c871e31a152d67df7720192fd752"
], - "position": 0
}
], - "filterPromotes": false,
- "hide": [
- {
- "objectID": "product-1"
}
], - "userData": {
- "settingID": "f2a7b51e3503acc6a39b3784ffb84300",
- "pluginVersion": "1.6.0"
}
}, - "description": "Display a promotional banner",
- "enabled": true,
- "validity": [
- {
- "from": 0,
- "until": 0
}
]
}
], - "nbHits": 0,
- "page": 0,
- "nbPages": 0
}
Get a synonym object
Get a syonym by its objectID
. To find the object IDs for your synonyms, use the search
operation.
Authorizations:
path Parameters
indexName required | string Example: myIndexName Index on which to perform the request. |
objectID required | string Example: synonymID Unique identifier of a synonym object. |
Responses
Response samples
- 200
- 400
- 402
- 403
- 404
{- "objectID": "synonymID",
- "type": "onewaysynonym",
- "synonyms": [
- "vehicle",
- "auto"
], - "input": "car",
- "word": "car",
- "corrections": [
- "vehicle",
- "auto"
], - "placeholder": "<Street>",
- "replacements": [
- "street",
- "st"
]
}
Save a synonym
Add a synonym to an index or replace it.
If the synonym objectID
doesn't exist, Algolia adds a new one.
If you use an existing synonym objectID
, the existing synonym is replaced with the new one.
To add multiple synonyms in a single API request, use the batch
operation.
Authorizations:
path Parameters
indexName required | string Example: myIndexName Index on which to perform the request. |
objectID required | string Example: synonymID Unique identifier of a synonym object. |
query Parameters
forwardToReplicas | boolean Indicates whether changed index settings are forwarded to the replica indices. |
Request Body schema: application/json
objectID required | string Unique identifier of a synonym object. |
type required | string (SynonymType) Enum: "synonym" "onewaysynonym" "altcorrection1" "altcorrection2" "placeholder" Synonym type. |
synonyms | Array of strings Words or phrases considered equivalent. |
input | string Word or phrase to appear in query strings (for |
word | string Word or phrase to appear in query strings (for |
corrections | Array of strings Words to be matched in records. |
placeholder | string Placeholder token to be put inside records. |
replacements | Array of strings Query words that will match the placeholder token. |
Responses
Request samples
- Payload
{- "objectID": "synonymID",
- "type": "onewaysynonym",
- "synonyms": [
- "vehicle",
- "auto"
], - "input": "car",
- "word": "car",
- "corrections": [
- "vehicle",
- "auto"
], - "placeholder": "<Street>",
- "replacements": [
- "street",
- "st"
]
}
Response samples
- 200
- 400
- 402
- 403
- 404
{- "taskID": 1514562690001,
- "updatedAt": "2023-07-04T12:49:15Z",
- "id": "12"
}
Delete a synonym
Delete a synonym by its objectID
. To find the object IDs of your synonyms, use the search
operation.
Authorizations:
path Parameters
indexName required | string Example: myIndexName Index on which to perform the request. |
objectID required | string Example: synonymID Unique identifier of a synonym object. |
query Parameters
forwardToReplicas | boolean Indicates whether changed index settings are forwarded to the replica indices. |
Responses
Response samples
- 200
- 400
- 402
- 403
- 404
{- "taskID": 1514562690001,
- "deletedAt": "2023-06-27T14:42:38.831Z"
}
Save a batch of synonyms
Create or update multiple synonyms.
Authorizations:
path Parameters
indexName required | string Example: myIndexName Index on which to perform the request. |
query Parameters
forwardToReplicas | boolean Indicates whether changed index settings are forwarded to the replica indices. |
replaceExistingSynonyms | boolean Indicates whether to replace all synonyms in the index with the ones sent with this request. |
Request Body schema: application/json
objectID required | string Unique identifier of a synonym object. |
type required | string (SynonymType) Enum: "synonym" "onewaysynonym" "altcorrection1" "altcorrection2" "placeholder" Synonym type. |
synonyms | Array of strings Words or phrases considered equivalent. |
input | string Word or phrase to appear in query strings (for |
word | string Word or phrase to appear in query strings (for |
corrections | Array of strings Words to be matched in records. |
placeholder | string Placeholder token to be put inside records. |
replacements | Array of strings Query words that will match the placeholder token. |
Responses
Request samples
- Payload
[- {
- "objectID": "synonymID",
- "type": "onewaysynonym",
- "synonyms": [
- "vehicle",
- "auto"
], - "input": "car",
- "word": "car",
- "corrections": [
- "vehicle",
- "auto"
], - "placeholder": "<Street>",
- "replacements": [
- "street",
- "st"
]
}
]
Response samples
- 200
- 400
- 402
- 403
- 404
{- "taskID": 1514562690001,
- "updatedAt": "2023-07-04T12:49:15Z"
}
Delete all synonyms
Delete all synonyms in the index.
Authorizations:
path Parameters
indexName required | string Example: myIndexName Index on which to perform the request. |
query Parameters
forwardToReplicas | boolean Indicates whether changed index settings are forwarded to the replica indices. |
Responses
Response samples
- 200
- 400
- 402
- 403
- 404
{- "taskID": 1514562690001,
- "updatedAt": "2023-07-04T12:49:15Z"
}
Search for synonyms
Search for synonyms in your index. You can control and filter the search with parameters. To get all synonyms, send an empty request body.
Authorizations:
path Parameters
indexName required | string Example: myIndexName Index on which to perform the request. |
query Parameters
type | string (SynonymType) Enum: "synonym" "onewaysynonym" "altcorrection1" "altcorrection2" "placeholder" Example: type=onewaysynonym Search for specific types of synonyms. |
page | integer or null >= 0 Default: 0 Returns the requested page number (the first page is 0). Page size is set by |
hitsPerPage | integer Default: 100 Maximum number of hits per page. |
Request Body schema: application/json
Body of the searchSynonyms
operation.
query | string (query) Default: "" Text to search for in an index. |
Responses
Request samples
- Payload
{- "query": ""
}
Response samples
- 200
- 400
- 402
- 403
- 404
{- "hits": [
- {
- "objectID": "synonymID",
- "type": "onewaysynonym",
- "synonyms": [
- "vehicle",
- "auto"
], - "input": "car",
- "word": "car",
- "corrections": [
- "vehicle",
- "auto"
], - "placeholder": "<Street>",
- "replacements": [
- "street",
- "st"
]
}
], - "nbHits": 20
}
Dictionary operations allow you to customize linguistic features such as stop words, plurals, and segmentation (compounds).
Batch dictionary entries
Add or remove a batch of dictionary entries.
Authorizations:
path Parameters
dictionaryName required | string (dictionaryType) Enum: "plurals" "stopwords" "compounds" Dictionary to search in. |
Request Body schema: application/json
clearExistingDictionaryEntries | boolean Default: false Incidates whether to replace all custom entries in the dictionary with the ones sent with this request. |
required | Array of objects (batchDictionaryEntriesRequest) Operations to batch. |
Responses
Request samples
- Payload
{- "clearExistingDictionaryEntries": false,
- "requests": [
- {
- "action": "addEntry",
- "body": {
- "objectID": "under",
- "language": "de",
- "word": "down",
- "words": [
- "cheval",
- "chevaux"
], - "decomposition": [
- "kopf",
- "schmerz",
- "tablette"
], - "state": "enabled"
}
}
]
}
Response samples
- 200
- 400
- 402
- 403
- 404
{- "taskID": 1514562690001,
- "updatedAt": "2023-07-04T12:49:15Z"
}
Search dictionary entries
Search for standard and custom entries in the stop words, plurals, or segmentation (compounds) dictionaries.
Authorizations:
path Parameters
dictionaryName required | string (dictionaryType) Enum: "plurals" "stopwords" "compounds" Dictionary to search in. |
Request Body schema: application/json
query required | string (query) Default: "" Text to search for in an index. |
page | integer (page) Default: 0 Page to retrieve (the first page is |
hitsPerPage | integer (hitsPerPage) [ 1 .. 1000 ] Default: 20 Number of hits per page. |
language | string (language) |
Responses
Request samples
- Payload
{- "query": "",
- "page": 0,
- "hitsPerPage": 20,
- "language": "en"
}
Response samples
- 200
- 400
- 402
- 403
- 404
{- "taskID": 1514562690001,
- "updatedAt": "2023-07-04T12:49:15Z"
}
Get stop word settings
Get the languages for which stop words are turned off.
Authorizations:
Responses
Response samples
- 200
- 400
- 402
- 403
- 404
{- "disableStandardEntries": {
- "plurals": "{'fr': false}\n",
- "stopwords": "{'fr': false}\n",
- "compounds": "{'fr': false}\n"
}
}
Set stop word settings
Set stop word settings for a specific language.
Authorizations:
Request Body schema: application/json
required | object (standardEntries) Key-value pairs of supported language ISO codes and boolean values. | ||||||
|
Responses
Request samples
- Payload
{- "disableStandardEntries": {
- "plurals": "{'fr': false}\n",
- "stopwords": "{'fr': false}\n",
- "compounds": "{'fr': false}\n"
}
}
Response samples
- 200
- 400
- 402
- 403
- 404
{- "taskID": 1514562690001,
- "updatedAt": "2023-07-04T12:49:15Z"
}
List available languages
Lists Algolia's supported languages and any customizations applied to each language's stop word, plural, and segmentation (compound) features.
Authorizations:
Responses
Response samples
- 200
- 400
- 402
- 403
- 404
{- "property1": {
- "plurals": {
- "nbCustomEntries": 0
}, - "stopwords": {
- "nbCustomEntries": 0
}, - "compounds": {
- "nbCustomEntries": 0
}
}, - "property2": {
- "plurals": {
- "nbCustomEntries": 0
}, - "stopwords": {
- "nbCustomEntries": 0
}, - "compounds": {
- "nbCustomEntries": 0
}
}
}
List API keys
List all API keys associated with your Algolia application, including their permissions and restrictions.
Authorizations:
Responses
Response samples
- 200
- 400
- 402
- 403
- 404
{- "keys": [
- {
- "value": "13ad45b4d0a2f6ea65ecbddf6aa260f2",
- "createdAt": 1656345570000,
- "acl": [
- "search",
- "addObject"
], - "description": "Browse-restricted key",
- "indexes": [
- "dev_*",
- "prod_products"
], - "maxHitsPerQuery": 0,
- "maxQueriesPerIPPerHour": 0,
- "queryParameters": "typoTolerance%3Dstrict%26ignorePlurals%3Dfalse%26filters%3Drights%3Apublic",
- "referers": [
- "*algolia.com*"
], - "validity": 86400
}
]
}
Add API key
Add a new API key with specific permissions and restrictions. The request must be authenticated with the admin API key. The response returns an API key string.
Authorizations:
Request Body schema: application/json
acl required | Array of strings (acl) Default: [] Items Enum: "addObject" "analytics" "browse" "deleteObject" "deleteIndex" "editSettings" "inference" "listIndexes" "logs" "personalization" "recommendation" "search" "seeUnretrievableAttributes" "settings" "usage" Permissions associated with the key. |
description | string Default: "" Description of an API key for you and your team members. |
indexes | Array of strings Default: [] Restricts this API key to a list of indices or index patterns. If the list is empty, all indices are allowed. Specify either an exact index name or a pattern with a leading or trailing wildcard character (or both). For example:
|
maxHitsPerQuery | integer Default: 0 Maximum number of hits this API key can retrieve in one query. If zero, no limit is enforced.
|
maxQueriesPerIPPerHour | integer Default: 0 Maximum number of API calls per hour allowed from a given IP address or user token.
Each time an API call is performed with this key, a check is performed. If there were more than the specified number of calls within the last hour, the API returns an error with the status code
|
queryParameters | string Default: "" Force some query parameters to be applied for each query made with this API key. It's a URL-encoded query string. |
referers | Array of strings Default: [] Restrict this API key to specific referrers. If empty, all referrers are allowed. For example:
|
validity | integer Default: 0 Validity duration of a key (in seconds). The key will automatically be removed after this time has expired. The default value of 0 never expires. Short-lived API keys are useful to grant temporary access to your data. For example, in mobile apps, you can't control when users update your app. So instead of encoding keys into your app as you would for a web app, you should dynamically fetch them from your mobile app's backend. |
Responses
Request samples
- Payload
{- "acl": [
- "search",
- "addObject"
], - "description": "Browse-restricted key",
- "indexes": [
- "dev_*",
- "prod_products"
], - "maxHitsPerQuery": 0,
- "maxQueriesPerIPPerHour": 0,
- "queryParameters": "typoTolerance%3Dstrict%26ignorePlurals%3Dfalse%26filters%3Drights%3Apublic",
- "referers": [
- "*algolia.com*"
], - "validity": 86400
}
Response samples
- 200
- 400
- 402
- 403
- 404
{- "key": "13ad45b4d0a2f6ea65ecbddf6aa260f2",
- "createdAt": "2023-07-04T12:49:15Z"
}
Get API key permissions
Get the permissions and restrictions of a specific API key. When authenticating with the admin API key, you can request information for any of your application's keys. When authenticating with other API keys, you can only retrieve information for that key.
Authorizations:
path Parameters
key required | string Example: YourAPIKey API key. |
Responses
Response samples
- 200
- 400
- 402
- 403
- 404
{- "value": "13ad45b4d0a2f6ea65ecbddf6aa260f2",
- "createdAt": 1656345570000,
- "acl": [
- "search",
- "addObject"
], - "description": "Browse-restricted key",
- "indexes": [
- "dev_*",
- "prod_products"
], - "maxHitsPerQuery": 0,
- "maxQueriesPerIPPerHour": 0,
- "queryParameters": "typoTolerance%3Dstrict%26ignorePlurals%3Dfalse%26filters%3Drights%3Apublic",
- "referers": [
- "*algolia.com*"
], - "validity": 86400
}
Update an API key
Replace the permissions of an existing API key. Any unspecified parameter resets that permission to its default value. The request must be authenticated with the admin API key.
Authorizations:
path Parameters
key required | string Example: YourAPIKey API key. |
Request Body schema: application/json
acl required | Array of strings (acl) Default: [] Items Enum: "addObject" "analytics" "browse" "deleteObject" "deleteIndex" "editSettings" "inference" "listIndexes" "logs" "personalization" "recommendation" "search" "seeUnretrievableAttributes" "settings" "usage" Permissions associated with the key. |
description | string Default: "" Description of an API key for you and your team members. |
indexes | Array of strings Default: [] Restricts this API key to a list of indices or index patterns. If the list is empty, all indices are allowed. Specify either an exact index name or a pattern with a leading or trailing wildcard character (or both). For example:
|
maxHitsPerQuery | integer Default: 0 Maximum number of hits this API key can retrieve in one query. If zero, no limit is enforced.
|
maxQueriesPerIPPerHour | integer Default: 0 Maximum number of API calls per hour allowed from a given IP address or user token.
Each time an API call is performed with this key, a check is performed. If there were more than the specified number of calls within the last hour, the API returns an error with the status code
|
queryParameters | string Default: "" Force some query parameters to be applied for each query made with this API key. It's a URL-encoded query string. |
referers | Array of strings Default: [] Restrict this API key to specific referrers. If empty, all referrers are allowed. For example:
|
validity | integer Default: 0 Validity duration of a key (in seconds). The key will automatically be removed after this time has expired. The default value of 0 never expires. Short-lived API keys are useful to grant temporary access to your data. For example, in mobile apps, you can't control when users update your app. So instead of encoding keys into your app as you would for a web app, you should dynamically fetch them from your mobile app's backend. |
Responses
Request samples
- Payload
{- "acl": [
- "search",
- "addObject"
], - "description": "Browse-restricted key",
- "indexes": [
- "dev_*",
- "prod_products"
], - "maxHitsPerQuery": 0,
- "maxQueriesPerIPPerHour": 0,
- "queryParameters": "typoTolerance%3Dstrict%26ignorePlurals%3Dfalse%26filters%3Drights%3Apublic",
- "referers": [
- "*algolia.com*"
], - "validity": 86400
}
Response samples
- 200
- 400
- 402
- 403
- 404
{- "key": "13ad45b4d0a2f6ea65ecbddf6aa260f2",
- "updatedAt": "2023-07-04T12:49:15Z"
}
Delete API key
Delete an existing API key. The request must be authenticated with the admin API key.
Authorizations:
path Parameters
key required | string Example: YourAPIKey API key. |
Responses
Response samples
- 200
- 400
- 402
- 403
- 404
{- "deletedAt": "2023-06-27T14:42:38.831Z"
}
Restore API key
Restore a deleted API key, along with its associated permissions. The request must be authenticated with the admin API key.
Authorizations:
path Parameters
key required | string Example: YourAPIKey API key. |
Responses
Response samples
- 200
- 400
- 402
- 403
- 404
{- "key": "13ad45b4d0a2f6ea65ecbddf6aa260f2",
- "createdAt": "2023-07-04T12:49:15Z"
}
Multi-cluster operations. Algolia no longer offers multi-cluster management.
- If you want to partition your data per user, use facets and secured API keys instead. - If you need more data, consider upgrading to a bigger cluster to suit your needs. Contact Algolia's support team for details.
Assign or move a user ID
Assign or move a user ID to a cluster. The time it takes to move a user is proportional to the amount of data linked to the user ID.
Authorizations:
header Parameters
X-Algolia-User-ID required | string^[a-zA-Z0-9 \-*.]+$ userID to assign. |
Request Body schema: application/json
cluster required | string (clusterName) Cluster name. |
Responses
Request samples
- Payload
{- "cluster": "c11-test"
}
Response samples
- 200
- 400
- 402
- 403
- 404
{- "createdAt": "2023-07-04T12:49:15Z"
}
List userIDs
List the userIDs assigned to a multi-cluster application. Since it can take up to a few seconds to get the data from the different clusters, the response isn't real-time.
Authorizations:
query Parameters
page | integer or null >= 0 Default: null Returns the requested page number. The page size is determined by the |
hitsPerPage | integer Default: 100 Maximum number of hits per page. |
Responses
Response samples
- 200
- 400
- 402
- 403
- 404
{- "userIDs": [
- {
- "userID": "user1",
- "clusterName": "c1-test",
- "nbRecords": 42,
- "dataSize": 0
}
]
}
Batch assign userIDs
Assign multiple user IDs to a cluster. You can't move users with this operation..
Authorizations:
header Parameters
X-Algolia-User-ID required | string^[a-zA-Z0-9 \-*.]+$ userID to assign. |
Request Body schema: application/json
cluster required | string (clusterName) Cluster name. |
users required | Array of strings User IDs to assign. |
Responses
Request samples
- Payload
{- "cluster": "c11-test",
- "users": [
- "einstein",
- "bohr",
- "feynman"
]
}
Response samples
- 200
- 400
- 402
- 403
- 404
{- "createdAt": "2023-07-04T12:49:15Z"
}
Get top userID
Get the IDs of the 10 users with the highest number of records per cluster. Since it can take up to a few seconds to get the data from the different clusters, the response isn't real-time.
Authorizations:
Responses
Response samples
- 200
- 400
- 402
- 403
- 404
{- "topUsers": [
- {
- "property1": [
- {
- "userID": "user1",
- "clusterName": "c1-test",
- "nbRecords": 42,
- "dataSize": 0
}
], - "property2": [
- {
- "userID": "user1",
- "clusterName": "c1-test",
- "nbRecords": 42,
- "dataSize": 0
}
]
}
]
}
Get userID
Returns the userID data stored in the mapping. Since it can take up to a few seconds to get the data from the different clusters, the response isn't real-time.
Authorizations:
path Parameters
userID required | string^[a-zA-Z0-9 \-*.]+$ userID to assign. |
Responses
Response samples
- 200
- 400
- 402
- 403
- 404
{- "userID": "user1",
- "clusterName": "c1-test",
- "nbRecords": 42,
- "dataSize": 0
}
Search for a user ID
Since it can take up to a few seconds to get the data from the different clusters, the response isn't real-time. To ensure rapid updates, the user IDs index isn't built at the same time as the mapping. Instead, it's built every 12 hours, at the same time as the update of user ID usage. For example, if you add or move a user ID, the search will show an old value until the next time the mapping is rebuilt (every 12 hours).
Authorizations:
Request Body schema: application/json
query required | string Query to search. The search is a prefix search with typo tolerance enabled. An empty query will retrieve all users. |
clusterName | string (clusterName) Cluster name. |
page | integer (page) Default: 0 Page to retrieve (the first page is |
hitsPerPage | integer (hitsPerPage) [ 1 .. 1000 ] Default: 20 Number of hits per page. |
Responses
Request samples
- Payload
{- "query": "string",
- "clusterName": "c11-test",
- "page": 0,
- "hitsPerPage": 20
}
Response samples
- 200
- 400
- 402
- 403
- 404
{- "hits": [
- {
- "userID": "user1",
- "clusterName": "c11-test",
- "nbRecords": 3,
- "dataSize": 481,
- "objectID": "string",
- "_highlightResult": {
- "userID": {
- "property1": {
- "value": "<em>George</em> <em>Clo</em>oney",
- "matchLevel": "none",
- "matchedWords": [
- "action"
], - "fullyHighlighted": true
}, - "property2": {
- "value": "<em>George</em> <em>Clo</em>oney",
- "matchLevel": "none",
- "matchedWords": [
- "action"
], - "fullyHighlighted": true
}
}, - "clusterName": {
- "property1": {
- "value": "<em>George</em> <em>Clo</em>oney",
- "matchLevel": "none",
- "matchedWords": [
- "action"
], - "fullyHighlighted": true
}, - "property2": {
- "value": "<em>George</em> <em>Clo</em>oney",
- "matchLevel": "none",
- "matchedWords": [
- "action"
], - "fullyHighlighted": true
}
}
}
}
], - "nbHits": 20,
- "page": 0,
- "hitsPerPage": 20,
- "updatedAt": "2023-07-04T12:49:15Z"
}
Get migration and user mapping status
To determine when the time-consuming process of creating a large batch of users or migrating users from one cluster to another is complete, this operation retrieves the status of the process.
Authorizations:
query Parameters
getClusters | boolean Indicates whether to include the cluster's pending mapping state in the response. |
Responses
Response samples
- 200
- 400
- 402
- 403
- 404
{- "pending": true,
- "clusters": {
- "property1": [
- "string"
], - "property2": [
- "string"
]
}
}
Vault operations. Algolia Vault allows you to restrict network-level access to your cluster to a specific set of IP addresses: for non-authorized IP addresses, the cluster is invisible. You should authorize the IP addresses of team members who need to access the Alglolia dashboard, as it's also affected by the restricted list you set up. To access this feature, Algolia Vault must be enabled on your server. Contact Algolia's support team for details.
Note: The maximum number of allowed sources is 1,000.
Replace all sources
Replace all allowed sources.
Authorizations:
Request Body schema: application/json
Allowed sources.
source required | string IP address range of the source. |
description | string Source description. |
Responses
Request samples
- Payload
[- {
- "source": "10.0.0.1/32",
- "description": "Server subnet"
}
]
Response samples
- 200
- 400
- 402
- 403
- 404
{- "updatedAt": "2023-07-04T12:49:15Z"
}
Add a source
Add a source to the list of allowed sources.
Authorizations:
Request Body schema: application/json
Source to add.
source required | string IP address range of the source. |
description | string Source description. |
Responses
Request samples
- Payload
{- "source": "10.0.0.1/32",
- "description": "Server subnet"
}
Response samples
- 200
- 400
- 402
- 403
- 404
{- "createdAt": "2023-07-04T12:49:15Z"
}
Return the latest log entries
The request must be authenticated by an API key with the logs
ACL.
Logs are held for the last seven days. There's also a logging limit of 1,000 API calls per server.
This request counts towards your operations quota but doesn't appear in the logs itself.
Note: To fetch the logs for a Distributed Search Network (DSN) cluster, target the DSN's endpoint.
Authorizations:
query Parameters
offset | integer Default: 0 First log entry to retrieve. Sorted by decreasing date with 0 being the most recent. |
length | integer <= 1000 Default: 10 Maximum number of entries to retrieve. |
indexName | string or null Example: indexName=products Index for which log entries should be retrieved. When omitted, log entries are retrieved for all indices. |
type | string (logType) Default: "all" Enum: "all" "query" "build" "error" Type of log entries to retrieve. When omitted, all log entries are retrieved. |
Responses
Response samples
- 200
- 400
- 402
- 403
- 404
{- "logs": [
- {
- "timestamp": "2023-03-08T12:34:56Z",
- "method": "GET",
- "answer_code": "200",
- "query_body": "\\n{\\n \\\"requests\\\": [\\n {\\n \\\"indexName\\\": \\\"best_buy\\\",\\n \\\"params\\\": \\\"query=&hitsPerPage=10&page=0&attributesToRetrieve=*&highlightPreTag=%3Cais-highlight-0000000000%3E&highlightPostTag=%3C%2Fais-highlight-0000000000%3E&getRankingInfo=1&facets=%5B%22brand%22%2C%22categories%22%2C%22free_shipping%22%2C%22type%22%5D&tagFilters=\\\"\\n }\\n ]\\n}\\n",
- "answer": "'n{\\n \\\"results\\\": [\\n {\\n \\\"hits\\\": [\\n {\\n \\\"name\\\": \\\"Amazon - Fire TV Stick\\\",\\n \\\"description\\\": \\\"Amazon Fire TV Stick connects to your TV's HDMI port. Just grab and go to enjoy Netflix, Prime Instant Video, Hulu Plus, YouTube.com, music, and much more.\\\",\\n \\\"brand\\\": \\\"Amazon\\\",\\n \\\"categories\\\": [\\n \\\"TV & Home Theater\\\",\\n \\\"Streaming Media Players\\\"\\n ],\\n \\\"hierarchicalCategories\\\": {\\n \\\"lvl0\\\": \\\"TV & Home Theater\\\",\\n \\\"lvl1\\\": \\\"TV & Home Theater > Streaming Media Players\\\"\\n },\\n \\\"type\\\": \\\"Streaming media plyr\\\",\\n \\\"price\\\": 39.99,\\n \\\"price_range\\\": \\\"1 - 50\\\",\\n \\\"image\\\": \\\"https:\\/\\/cdn-demo.algolia.com\\/bestbuy\\/9999119_sb.jpg\\\",\\n \\\"url\\\": \\\"http:\\/\\/www.bestbuy.com\\/site\\/amazon-fire-tv-stick\\/9999119.p?id=1219460752591&skuId=9999119&cmp=RMX&ky=1uWSHMdQqBeVJB9cXgEke60s5EjfS6M1W\\\",\\n \\\"free_shipping\\\": false,\\n \\\"popularity\\\": 9843,\\n \\\"rating\\\": 4,\\n \\\"objectID\\\": \\\"9999119\\\"\\n'\n",
- "url": "/1/indexes",
- "ip": "127.0.0.1",
- "query_headers": "User-Agent: curl/7.24.0 (x86_64-apple-darwin12.0) libcurl/7.24.0 OpenSSL/0.9.8x zlib/1.2.5\\nHost: localhost.algolia.com:8080\\nAccept: */*\\nContent-Type: application/json; charset=utf-8\\nX-Algolia-API-Key: 20f***************************\\nX-Algolia-Application-Id: MyApplicationID\\n",
- "sha1": "26c53bd7e38ca71f4741b71994cd94a600b7ac68",
- "nb_api_calls": "1",
- "processing_time_ms": "2",
- "index": "best_buy",
- "query_params": "query=georgia&attributesToRetrieve=name,city,country",
- "query_nb_hits": "1",
- "inner_queries": [
- {
- "index_name": "best_buy",
- "user_token": "93.189.166.128",
- "query_id": "313453231"
}
]
}
]
}
replicas | Array of strings Default: [] Creates replicas, which are copies of a primary index with the same records but different settings. |
paginationLimitedTo | integer Default: 1000 Maximum number of hits accessible through pagination. |
unretrievableAttributes | Array of strings Default: [] Attributes that can't be retrieved at query time. |
disableTypoToleranceOnWords | |
attributesToTransliterate | Array of strings Attributes in your index to which Japanese transliteration applies. This will ensure that words indexed in Katakana or Kanji can also be searched in Hiragana. |
camelCaseAttributes | |
decompoundedAttributes | |
indexLanguages | Array of strings Default: [] Set the languages of your index, for language-specific processing steps such as tokenization and normalization. |
disablePrefixOnAttributes | |
allowCompressionOfIntegerArray | boolean Default: false Incidates whether the engine compresses arrays with exclusively non-negative integers. When enabled, the compressed arrays may be reordered. |
numericAttributesForFiltering | |
separatorsToIndex | string Default: "" Controls which separators are added to an Algolia index as part of normalization. Separators are all non-letter characters except spaces and currency characters, such as $€£¥. |
searchableAttributes | Array of strings Default: [] |
userData | object (userData) Default: {} Lets you store custom data in your indices. |
object A list of characters and their normalized replacements to override Algolia's default normalization. | |
attributesForFaceting | |
attributesToRetrieve | Array of strings Default: ["*"] Attributes to include in the API response. To reduce the size of your response, you can retrieve only some of the attributes. By default, the response includes all attributes. |
ranking | Array of strings Default: ["typo","geo","words","filters","proximity","attribute","exact","custom"] Determines the order in which Algolia returns your results. |
customRanking | Array of strings Default: [] Specifies the Custom ranking criterion. Use the |
relevancyStrictness | integer Default: 100 Relevancy threshold below which less relevant results aren't included in the results. |
attributesToHighlight | Array of strings Attributes to highlight. Strings that match the search query in the attributes are highlighted by surrounding them with HTML tags ( |
attributesToSnippet | Array of strings Default: [] Attributes to snippet. 'Snippeting' is shortening the attribute to a certain number of words. If not specified, the attribute is shortened to the 10 words around the matching string but you can specify the number. For example: |
highlightPreTag | string Default: "<em>" HTML string to insert before the highlighted parts in all highlight and snippet results. |
highlightPostTag | string Default: "</em>" HTML string to insert after the highlighted parts in all highlight and snippet results. |
snippetEllipsisText | string Default: "…" String used as an ellipsis indicator when a snippet is truncated. |
restrictHighlightAndSnippetArrays | boolean Default: false Restrict highlighting and snippeting to items that matched the query. |
hitsPerPage | integer (hitsPerPage) [ 1 .. 1000 ] Default: 20 Number of hits per page. |
minWordSizefor1Typo | integer Default: 4 Minimum number of characters a word in the query string must contain to accept matches with one typo. |
minWordSizefor2Typos | integer Default: 8 Minimum number of characters a word in the query string must contain to accept matches with two typos. |
boolean or typoToleranceEnum (string) (typoTolerance) Controls whether typo tolerance is enabled and how it is applied. | |
allowTyposOnNumericTokens | boolean Default: true Whether to allow typos on numbers ("numeric tokens") in the query string. |
disableTypoToleranceOnAttributes | |
Array of strings or boolean (ignorePlurals) Treats singular, plurals, and other forms of declensions as matching terms.
| |
Array of strings or boolean (removeStopWords) Removes stop (common) words from the query before executing it.
| |
keepDiacriticsOnCharacters | |
queryLanguages | Array of strings Default: [] Sets your user's search language. This adjusts language-specific settings and features such as |
decompoundQuery | |
enableRules | |
enablePersonalization | |
queryType | string (queryType) Default: "prefixLast" Enum: "prefixLast" "prefixAll" "prefixNone" Determines how query words are interpreted as prefixes. |
removeWordsIfNoResults | string (removeWordsIfNoResults) Default: "none" Enum: "none" "lastWords" "firstWords" "allOptional" Strategy to remove words from the query when it doesn't match any hits. |
mode | string (mode) Default: "keywordSearch" Enum: "neuralSearch" "keywordSearch" Search mode the index will use to query for results. |
object (semanticSearch) Settings for the semantic search part of NeuralSearch. Only used when | |
advancedSyntax | |
optionalWords | |
disableExactOnAttributes | |
exactOnSingleWordQuery | string (exactOnSingleWordQuery) Default: "attribute" Enum: "attribute" "none" "word" Determines how the Exact ranking criterion is computed when the query contains only one word. |
alternativesAsExact | Array of strings (alternativesAsExact) Default: ["ignorePlurals","singleWordSynonym"] Items Enum: "ignorePlurals" "singleWordSynonym" "multiWordsSynonym" Alternatives that should be considered an exact match by the exact ranking criterion. |
advancedSyntaxFeatures | Array of strings (advancedSyntaxFeatures) Default: ["exactPhrase","excludeWords"] Items Enum: "exactPhrase" "excludeWords" Allows you to specify which advanced syntax features are active when |
boolean or integer (distinct) | |
attributeForDistinct | string Name of the deduplication attribute to be used with Algolia's distinct feature. |
replaceSynonymsInHighlight | boolean Default: false Whether to highlight and snippet the original word that matches the synonym or the synonym itself. |
minProximity | |
responseFields | Array of strings Default: [] Attributes to include in the API response for search and browse queries. |
maxFacetHits | integer (maxFacetHits) <= 100 Default: 10 Maximum number of facet hits to return when searching for facet values. |
maxValuesPerFacet | integer Default: 100 Maximum number of facet values to return for each facet. |
sortFacetValuesBy | string Default: "count" Controls how facet values are fetched. |
attributeCriteriaComputedByMinProximity | boolean Default: false When the Attribute criterion is ranked above Proximity in your ranking formula, Proximity is used to select which searchable attribute is matched in the Attribute ranking stage. |
object (renderingContent) Extra content for the search UI, for example, to control the ordering and display of facets. You can set a default value and dynamically override it with Rules. | |
enableReRanking | |
(Array of listOfSearchFilters (Array of searchFiltersArrayString (strings) or strings or null)) or (string or null) (reRankingApplyFilter) When Dynamic Re-Ranking is enabled, only records that match these filters will be affected by Dynamic Re-Ranking. |
{- "replicas": [
- "virtual(prod_products_price_asc)",
- "dev_products_replica"
], - "paginationLimitedTo": 20,
- "unretrievableAttributes": [
- "popularity"
], - "disableTypoToleranceOnWords": [
- "wheel",
- "1X2BCD"
], - "attributesToTransliterate": [
- "name",
- "description"
], - "camelCaseAttributes": [
- "description"
], - "decompoundedAttributes": {
- "de": [
- "name"
]
}, - "indexLanguages": [
- "ja"
], - "disablePrefixOnAttributes": [
- "sku"
], - "allowCompressionOfIntegerArray": false,
- "numericAttributesForFiltering": [
- "quantity",
- "popularity"
], - "separatorsToIndex": "+#",
- "searchableAttributes": [
- "title,alternative_title",
- "author",
- "unordered(text)",
- "emails.personal"
], - "userData": {
- "settingID": "f2a7b51e3503acc6a39b3784ffb84300",
- "pluginVersion": "1.6.0"
}, - "customNormalization": "{default: {'ä': 'ae', 'ü': 'ue'}}\n",
- "attributesForFaceting": [
- "author",
- "filterOnly(isbn)",
- "searchable(edition)",
- "afterDistinct(category)",
- "afterDistinct(searchable(publisher))"
], - "attributesToRetrieve": [
- "author",
- "title",
- "content"
], - "ranking": [
- "typo",
- "geo",
- "words",
- "filters",
- "proximity",
- "attribute",
- "exact",
- "custom"
], - "customRanking": [
- "desc(popularity)",
- "asc(price)"
], - "relevancyStrictness": 90,
- "attributesToHighlight": [
- "author",
- "title",
- "content"
], - "attributesToSnippet": [
- "content:80",
- "description"
], - "highlightPreTag": "<em>",
- "highlightPostTag": "</em>",
- "snippetEllipsisText": "…",
- "restrictHighlightAndSnippetArrays": false,
- "hitsPerPage": 20,
- "minWordSizefor1Typo": 4,
- "minWordSizefor2Typos": 8,
- "typoTolerance": true,
- "allowTyposOnNumericTokens": true,
- "disableTypoToleranceOnAttributes": [
- "sku"
], - "ignorePlurals": [
- "ca",
- "es"
], - "removeStopWords": [
- "ca",
- "es"
], - "keepDiacriticsOnCharacters": "øé",
- "queryLanguages": [
- "es"
], - "decompoundQuery": true,
- "enableRules": true,
- "enablePersonalization": false,
- "queryType": "prefixLast",
- "removeWordsIfNoResults": "firstWords",
- "mode": "neuralSearch",
- "semanticSearch": {
- "eventSources": [
- "string"
]
}, - "advancedSyntax": false,
- "optionalWords": [
- "blue",
- "iphone case"
], - "disableExactOnAttributes": [
- "description"
], - "exactOnSingleWordQuery": "attribute",
- "alternativesAsExact": [
- "ignorePlurals",
- "singleWordSynonym"
], - "advancedSyntaxFeatures": [
- "exactPhrase",
- "excludeWords"
], - "distinct": 1,
- "attributeForDistinct": "url",
- "replaceSynonymsInHighlight": false,
- "minProximity": 1,
- "responseFields": [ ],
- "maxFacetHits": 10,
- "maxValuesPerFacet": 100,
- "sortFacetValuesBy": "count",
- "attributeCriteriaComputedByMinProximity": false,
- "renderingContent": {
- "facetOrdering": {
- "facets": {
- "order": [
- "string"
]
}, - "values": {
- "property1": {
- "order": [
- "string"
], - "sortRemainingBy": "count"
}, - "property2": {
- "order": [
- "string"
], - "sortRemainingBy": "count"
}
}
}
}, - "enableReRanking": true,
- "reRankingApplyFilter": [
- [
- "string"
]
]
}
.