🎉 Try the public beta of the new docs site at algolia.com/doc-beta! 🎉
Algolia CLI / Commands

Manage your Algolia settings.

algolia settings get

Usage
algolia settings get <index> [flags]

Get the settings of the specified index.

Examples

1
2
3
# Store the settings of an index in a file
$ algolia settings get MOVIES > movies_settings.json

Output formatting flags

--allow-missing-template-keys

If true, ignore any errors in templates when a field or map key is missing in the template. Only applies to golang and jsonpath output formats.

-o, --output

Output format. One of: (json, jsonpath, jsonpath-as-json, jsonpath-file).

--template

Template string or path to template file to use when –output=jsonpath, –output=jsonpath-file.

algolia settings import

Usage
algolia settings import <index> -F <file> [flags]

Import the index settings from the given file.

Examples

1
2
3
# Import the settings from "settings.json" to the "MOVIES" index
$ algolia settings import MOVIES -F settings.json

Flags

-F, --file

Read settings from file (use “-“ to read from standard input).

algolia settings set

Usage
algolia settings set <index> [flags]

Set the settings of the specified index.

Examples

1
2
3
# Set the typo tolerance to false on the MOVIES index
$ algolia settings set MOVIES --typoTolerance="false"

Advanced

--attributeCriteriaComputedByMinProximity

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.

--distinct

Enables deduplication or grouping of results (Algolia’s distinct feature).

--maxFacetHits

Maximum number of facet hits to return when searching for facet values.

--minProximity

Precision of the proximity ranking criterion.

--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.

--responseFields

Attributes to include in the API response for search and browse queries.

--userData

Lets you store custom data in your indices.

Attributes

--attributesToRetrieve

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.

--searchableAttributes

Attributes used for searching, including determining if matches at the beginning of a word are important (ordered) or not (unordered).
.

--unretrievableAttributes

Attributes that can’t be retrieved at query time.

Faceting

--attributesForFaceting

Attributes used for faceting and the modifiers that can be applied: filterOnly, searchable, and afterDistinct.
.

--maxValuesPerFacet

Maximum number of facet values to return for each facet.

--sortFacetValuesBy

Controls how facet values are fetched.

Filtering

--enableReRanking

Indicates whether this search will use Dynamic Re-Ranking.

Highlighting and Snippeting

--attributesToHighlight

Attributes to highlight. Strings that match the search query in the attributes are highlighted by surrounding them with HTML tags (highlightPreTag and highlightPostTag).

--attributesToSnippet

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: body:20.
.

--highlightPostTag

HTML string to insert after the highlighted parts in all highlight and snippet results.

--highlightPreTag

HTML string to insert before the highlighted parts in all highlight and snippet results.

--replaceSynonymsInHighlight

Whether to highlight and snippet the original word that matches the synonym or the synonym itself.

--restrictHighlightAndSnippetArrays

Restrict highlighting and snippeting to items that matched the query.

--snippetEllipsisText

String used as an ellipsis indicator when a snippet is truncated.

Languages

--attributesToTransliterate

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

Attributes on which to split camel case words.

--customNormalization

A list of characters and their normalized replacements to override Algolia’s default normalization.

--decompoundQuery

Splits compound words into their component word parts in the query.
.

--decompoundedAttributes

Attributes in your index to which word segmentation (decompounding) applies.

--ignorePlurals

Treats singular, plurals, and other forms of declensions as matching terms.
ignorePlurals is used in conjunction with the queryLanguages setting.
list: language ISO codes for which ignoring plurals should be enabled. This list will override any values that you may have set in queryLanguages. true: enables the ignore plurals feature, where singulars and plurals are considered equivalent (“foot” = “feet”). The languages supported here are either every language (this is the default) or those set by queryLanguages. false: turns off the ignore plurals feature, so that singulars and plurals aren’t considered to be the same (“foot” will not find “feet”).
.

--indexLanguages

Set the languages of your index, for language-specific processing steps such as tokenization and normalization.

--keepDiacriticsOnCharacters

Characters that the engine shouldn’t automatically normalize.

--queryLanguages

Sets your user’s search language. This adjusts language-specific settings and features such as ignorePlurals, removeStopWords, and CJK word detection.

--removeStopWords

Removes stop (common) words from the query before executing it.
removeStopWords is used in conjunction with the queryLanguages setting.
list: language ISO codes for which stop words should be enabled. This list will override any values that you may have set in queryLanguages. true: enables the stop words feature, ensuring that stop words are removed from consideration in a search. The languages supported here are either every language (this is the default) or those set by queryLanguages. false: turns off the stop words feature, allowing stop words to be taken into account in a search.
.

Other flags

--attributeForDistinct

Name of the deduplication attribute to be used with Algolia’s distinct feature.

-f, --forward-to-replicas

Forward the settings to the replicas.

--paginationLimitedTo

Maximum number of hits accessible through pagination.

--reRankingApplyFilter

When Dynamic Re-Ranking is enabled, only records that match these filters will be affected by Dynamic Re-Ranking.

--semanticSearch

Settings for the semantic search part of NeuralSearch. Only used when mode is neuralSearch.
.

Pagination

--hitsPerPage

Number of hits per page.

Performance

--allowCompressionOfIntegerArray

Incidates whether the engine compresses arrays with exclusively non-negative integers.
When enabled, the compressed arrays may be reordered.
.

--numericAttributesForFiltering

Numeric attributes that can be used as numerical filters.

Personalization

--enablePersonalization

Incidates whether Personalization is enabled.

Query strategy

--advancedSyntax

Enables the advanced query syntax.

--advancedSyntaxFeatures

Allows you to specify which advanced syntax features are active when advancedSyntax is enabled.

--alternativesAsExact

Alternatives that should be considered an exact match by the exact ranking criterion.

--disableExactOnAttributes

Attributes for which you want to turn off the exact ranking criterion.

--disablePrefixOnAttributes

Attributes for which you want to turn off prefix matching.

--exactOnSingleWordQuery

Determines how the Exact ranking criterion is computed when the query contains only one word. One of: (attribute, none, word).

--mode

Search mode the index will use to query for results. One of: (neuralSearch, keywordSearch).

--optionalWords

Words which should be considered optional when found in a query.

--queryType

Determines how query words are interpreted as prefixes. One of: (prefixLast, prefixAll, prefixNone).

--removeWordsIfNoResults

Strategy to remove words from the query when it doesn’t match any hits. One of: (none, lastWords, firstWords, allOptional).

Ranking

--customRanking

Specifies the Custom ranking criterion. Use the asc and desc modifiers to specify the ranking order: ascending or descending.
.

--ranking

Determines the order in which Algolia returns your results.

--relevancyStrictness

Relevancy threshold below which less relevant results aren’t included in the results.

--replicas

Creates replicas, which are copies of a primary index with the same records but different settings.

Rules

--enableRules

Incidates whether Rules are enabled.

Typos

--allowTyposOnNumericTokens

Whether to allow typos on numbers (“numeric tokens”) in the query string.

--disableTypoToleranceOnAttributes

Attributes for which you want to turn off typo tolerance.

--disableTypoToleranceOnWords

Words for which you want to turn off typo tolerance.

--minWordSizefor1Typo

Minimum number of characters a word in the query string must contain to accept matches with one typo.

--minWordSizefor2Typos

Minimum number of characters a word in the query string must contain to accept matches with two typos.

--separatorsToIndex

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 $₏£„.

--typoTolerance

Controls whether typo tolerance is enabled and how it is applied.

Did you find this page helpful?