Algolia CLI / Commands

Manage your Algolia settings.

algolia settings get# A

Usage
algolia settings get <index> [flags]

Get the settings of the specified index.

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# A

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 "TEST_PRODUCTS_1" index
$ algolia settings import TEST_PRODUCTS_1 -F settings.json

Flags#

-F, --settings-file #

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

algolia settings set# A

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 PRODUCTS index
$ algolia settings set PRODUCTS --typoTolerance="false"

Advanced#

--attributeCriteriaComputedByMinProximity #

When attribute 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 de-duplication or grouping of results.

--maxFacetHits #

Maximum number of facet hits to return during a search for facet values. For performance reasons, the maximum allowed number of returned values is 100.

--minProximity #

Precision of the proximity ranking criterion.

--renderingContent #

Content defining how the search interface should be rendered. Can be set via the settings for a default value and can be overridden via rules.

--responseFields #

Choose which fields to return in the API response. This parameters applies to search and browse queries.

--synonyms #

Whether to take into account an index’s synonyms for a particular search.

--userData #

Lets you store custom data in your indices.

Attributes#

--attributesToRetrieve #

This parameter controls which attributes to retrieve and which not to retrieve.

--restrictSearchableAttributes #

Restricts a given query to look in only a subset of your searchable attributes.

--searchableAttributes #

The complete list of attributes used for searching.

--unretrievableAttributes #

List of attributes that can’t be retrieved at query time.

Faceting#

--attributesForFaceting #

The complete list of attributes that will be used for faceting.

Highlighting/Snippeting#

--attributesToHighlight #

List of attributes to highlight.

--attributesToSnippet #

List of attributes to snippet, with an optional maximum number of words to snippet.

--highlightPostTag #

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

--highlightPreTag #

The 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 #

Specify on which attributes to apply transliteration.

--camelCaseAttributes #

List of attributes on which to do a decomposition of camel case words.

--decompoundQuery #

Splits compound words into their composing atoms in the query.

--decompoundedAttributes #

Specify on which attributes in your index Algolia should apply word segmentation, also known as decompounding.

--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 functionality, where singulars and plurals are considered equivalent (foot = feet). The languages supported here are either every language (this is the default, see list of languages below), or those set by queryLanguages. false: disables ignore plurals, where singulars and plurals are not considered the same for matching purposes (foot will not find feet).
.

--indexLanguages #

Sets the languages at the index level for language-specific processing such as tokenization and normalization.

--keepDiacriticsOnCharacters #

List of characters that the engine shouldn’t automatically normalize.

--queryLanguages #

Sets the languages to be used by language-specific settings and functionalities 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 ignoring plurals should be enabled. This list will override any values that you may have set in queryLanguages. true: enables the stop word functionality, ensuring that stop words are removed from consideration in a search. The languages supported here are either every language, or those set by queryLanguages. false: disables stop word functionality, allowing stop words to be taken into account in a search.
.

Other flags#

-f, --forward-to-replicas #

Forward the settings to the replicas.

--paginationLimitedTo #

Set the maximum number of hits accessible via pagination.

Pagination#

--hitsPerPage #

Set the number of hits per page.

Performance#

--allowCompressionOfIntegerArray #

Enables compression of large integer arrays.

--numericAttributesForFiltering #

List of numeric attributes that can be used as numerical filters.

Personalization#

--enablePersonalization #

Enable the Personalization feature.

Query strategy#

--advancedSyntax #

Enables the advanced query syntax.

--advancedSyntaxFeatures #

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

--alternativesAsExact #

List of alternatives that should be considered an exact match by the exact ranking criterion.

--disableExactOnAttributes #

List of attributes on which you want to disable the exact ranking criterion.

--disablePrefixOnAttributes #

List of attributes on which you want to disable prefix matching.

--exactOnSingleWordQuery #

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

--optionalWords #

A list of words that should be considered as optional when found in the query.

--queryType #

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

--removeWordsIfNoResults #

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

--ranking #

Controls how Algolia should sort your results.

--relevancyStrictness #

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

--replicas #

Creates replicas, exact copies of an index.

Rules#

--enableRules #

Whether Rules should be globally enabled.

Typos#

--allowTyposOnNumericTokens #

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

--disableTypoToleranceOnAttributes #

List of attributes on which you want to disable typo tolerance.

--disableTypoToleranceOnWords #

A list of 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 1 typo.

--minWordSizefor2Typos #

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

--separatorsToIndex #

Control which separators are indexed.

--typoTolerance #

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

Did you find this page helpful?