algolia objects
Manage your indices’ objects.
algolia objects browse
algolia objects browse <index> [flags]
Browse the index objects.
Examples
1
2
3
4
5
6
7
8
9
10
11
12
# Browse the objects from the "MOVIES" index
$ algolia objects browse MOVIES
# Browse the objects from the "MOVIES" index and select which attributes to retrieve
$ algolia objects browse MOVIES --attributesToRetrieve title,overview
# Browse the objects from the "MOVIES" index with filters
$ algolia objects browse MOVIES --filters "genres:Drama"
# Browse the objects from the "MOVIES" and export the results to a new line delimited JSON (ndjson) file
$ algolia objects browse MOVIES > movies.ndjson
Advanced
-
--attributeCriteriaComputedByMinProximity
-
Whether the best matching attribute should be determined by minimum proximity.
See: https://www.algolia.com/doc/api-reference/api-parameters/attributeCriteriaComputedByMinProximity/ -
--distinct
-
Determines how many records of a group are included in the search results.
See: https://www.algolia.com/doc/api-reference/api-parameters/distinct/ -
--enableABTest
-
Whether to enable A/B testing for this search.
See: https://www.algolia.com/doc/api-reference/api-parameters/enableABTest/ -
--getRankingInfo
-
Whether the search response should include detailed ranking information.
See: https://www.algolia.com/doc/api-reference/api-parameters/getRankingInfo/ -
--maxFacetHits
-
Maximum number of facet values to return when searching for facet values.
See: https://www.algolia.com/doc/api-reference/api-parameters/maxFacetHits/ -
--minProximity
-
Minimum proximity score for two matching words.
See: https://www.algolia.com/doc/api-reference/api-parameters/minProximity/ -
--percentileComputation
-
Whether to include this search when calculating processing-time percentiles.
See: https://www.algolia.com/doc/api-reference/api-parameters/percentileComputation/ -
--renderingContent
-
Extra data that can be used in the search UI.
See: https://www.algolia.com/doc/api-reference/api-parameters/renderingContent/ -
--responseFields
-
Properties to include in the API response of search and browse requests.
See: https://www.algolia.com/doc/api-reference/api-parameters/responseFields/ -
--synonyms
-
Whether to take into account an index’s synonyms for this search.
See: https://www.algolia.com/doc/api-reference/api-parameters/synonyms/
Analytics
-
--analytics
-
Whether this search will be included in Analytics.
See: https://www.algolia.com/doc/api-reference/api-parameters/analytics/ -
--analyticsTags
-
Tags to apply to the query for segmenting analytics data.
See: https://www.algolia.com/doc/api-reference/api-parameters/analyticsTags/ -
--clickAnalytics
-
Whether to include a queryID attribute in the response.
See: https://www.algolia.com/doc/api-reference/api-parameters/clickAnalytics/
Attributes
-
--attributesToRetrieve
-
Attributes to include in the API response.
See: https://www.algolia.com/doc/api-reference/api-parameters/attributesToRetrieve/
Faceting
-
--facetingAfterDistinct
-
Whether faceting should be applied after deduplication with distinct.
See: https://www.algolia.com/doc/api-reference/api-parameters/facetingAfterDistinct/ -
--facets
-
Facets for which to retrieve facet values that match the search criteria and the number of matching facet values.
See: https://www.algolia.com/doc/api-reference/api-parameters/facets/ -
--maxValuesPerFacet
-
Maximum number of facet values to return for each facet.
See: https://www.algolia.com/doc/api-reference/api-parameters/maxValuesPerFacet/ -
--sortFacetValuesBy
-
Order in which to retrieve facet values.
See: https://www.algolia.com/doc/api-reference/api-parameters/sortFacetValuesBy/
Filtering
-
--enableReRanking
-
Whether this search will use Dynamic Re-Ranking.
See: https://www.algolia.com/doc/api-reference/api-parameters/enableReRanking/ -
--facetFilters
-
Filter the search by facet values, so that only records with the same facet values are retrieved.
See: https://www.algolia.com/doc/api-reference/api-parameters/facetFilters/ -
--filters
-
Filter expression to only include items that match the filter criteria in the response.
See: https://www.algolia.com/doc/api-reference/api-parameters/filters/ -
--numericFilters
-
Filter by numeric facets.
See: https://www.algolia.com/doc/api-reference/api-parameters/numericFilters/ -
--optionalFilters
-
Filters to promote or demote records in the search results.
See: https://www.algolia.com/doc/api-reference/api-parameters/optionalFilters/ -
--restrictSearchableAttributes
-
Restricts a search to a subset of your searchable attributes.
See: https://www.algolia.com/doc/api-reference/api-parameters/restrictSearchableAttributes/ -
--sumOrFiltersScores
-
Whether to sum all filter scores.
See: https://www.algolia.com/doc/api-reference/api-parameters/sumOrFiltersScores/ -
--tagFilters
-
Filter the search by values of the special _tags attribute.
See: https://www.algolia.com/doc/api-reference/api-parameters/tagFilters/
Geo-Search
-
--aroundLatLng
-
Coordinates for the center of a circle, expressed as a comma-separated string of latitude and longitude.
See: https://www.algolia.com/doc/api-reference/api-parameters/aroundLatLng/ -
--aroundLatLngViaIP
-
Whether to obtain the coordinates from the request’s IP address.
See: https://www.algolia.com/doc/api-reference/api-parameters/aroundLatLngViaIP/ -
--aroundPrecision
-
Precision of a coordinate-based search in meters to group results with similar distances.
See: https://www.algolia.com/doc/api-reference/api-parameters/aroundPrecision/ -
--aroundRadius
-
Maximum radius for a search around a central location.
See: https://www.algolia.com/doc/api-reference/api-parameters/aroundRadius/ -
--minimumAroundRadius
-
Minimum radius (in meters) for a search around a location when aroundRadius isn’t set.
See: https://www.algolia.com/doc/api-reference/api-parameters/minimumAroundRadius/
Highlighting and Snippeting
-
--attributesToHighlight
-
Attributes to highlight.
See: https://www.algolia.com/doc/api-reference/api-parameters/attributesToHighlight/ -
--attributesToSnippet
-
Attributes for which to enable snippets.
See: https://www.algolia.com/doc/api-reference/api-parameters/attributesToSnippet/ -
--highlightPostTag
-
HTML tag to insert after the highlighted parts in all highlighted results and snippets.
See: https://www.algolia.com/doc/api-reference/api-parameters/highlightPostTag/ -
--highlightPreTag
-
HTML tag to insert before the highlighted parts in all highlighted results and snippets.
See: https://www.algolia.com/doc/api-reference/api-parameters/highlightPreTag/ -
--replaceSynonymsInHighlight
-
Whether to replace a highlighted word with the matched synonym.
See: https://www.algolia.com/doc/api-reference/api-parameters/replaceSynonymsInHighlight/ -
--restrictHighlightAndSnippetArrays
-
Whether to restrict highlighting and snippeting to items that at least partially matched the search query.
See: https://www.algolia.com/doc/api-reference/api-parameters/restrictHighlightAndSnippetArrays/ -
--snippetEllipsisText
-
String used as an ellipsis indicator when a snippet is truncated.
See: https://www.algolia.com/doc/api-reference/api-parameters/snippetEllipsisText/
Languages
-
--decompoundQuery
-
Whether to split compound words into their building blocks.
See: https://www.algolia.com/doc/api-reference/api-parameters/decompoundQuery/ -
--ignorePlurals
-
Treat singular, plurals, and other forms of declensions as equivalent.
See: https://www.algolia.com/doc/api-reference/api-parameters/ignorePlurals/ -
--keepDiacriticsOnCharacters
-
Characters for which diacritics should be preserved.
See: https://www.algolia.com/doc/api-reference/api-parameters/keepDiacriticsOnCharacters/ -
--naturalLanguages
-
ISO language codes that adjust settings that are useful for processing natural language queries (as opposed to keyword searches).
See: https://www.algolia.com/doc/api-reference/api-parameters/naturalLanguages/ -
--queryLanguages
-
Languages for language-specific query processing steps such as plurals, stop-word removal, and word-detection dictionaries.
See: https://www.algolia.com/doc/api-reference/api-parameters/queryLanguages/ -
--removeStopWords
-
Removes stop words from the search query.
See: https://www.algolia.com/doc/api-reference/api-parameters/removeStopWords/
Other flags
-
--reRankingApplyFilter
-
Restrict Dynamic Re-Ranking to records that match these filters.
-
--semanticSearch
-
Settings for the semantic search part of NeuralSearch.
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.
Pagination
-
--hitsPerPage
-
Number of hits per page.
See: https://www.algolia.com/doc/api-reference/api-parameters/hitsPerPage/ -
--length
-
Number of hits to retrieve (used in combination with offset).
See: https://www.algolia.com/doc/api-reference/api-parameters/length/ -
--offset
-
Position of the first hit to retrieve.
See: https://www.algolia.com/doc/api-reference/api-parameters/offset/ -
--page
-
Page of search results to retrieve.
See: https://www.algolia.com/doc/api-reference/api-parameters/page/
Personalization
-
--enablePersonalization
-
Indicates whether Personalization is enabled.
-
--personalizationImpact
-
Defines how much Personalization affects results.
-
--userToken
-
Unique pseudonymous or anonymous user identifier.
See: https://www.algolia.com/doc/api-reference/api-parameters/userToken/
Query strategy
-
--advancedSyntax
-
Whether to support phrase matching and excluding words from search queries.
See: https://www.algolia.com/doc/api-reference/api-parameters/advancedSyntax/ -
--advancedSyntaxFeatures
-
Advanced search syntax features you want to support.
See: https://www.algolia.com/doc/api-reference/api-parameters/advancedSyntaxFeatures/ -
--alternativesAsExact
-
Alternatives of query words that should be considered as exact matches by the Exact ranking criterion.
See: https://www.algolia.com/doc/api-reference/api-parameters/alternativesAsExact/ -
--disableExactOnAttributes
-
Searchable attributes for which you want to turn off the Exact ranking criterion.
See: https://www.algolia.com/doc/api-reference/api-parameters/disableExactOnAttributes/ -
--exactOnSingleWordQuery
-
Determines how the Exact ranking criterion is computed when the search query has only one word. One of: attribute, none, word.
See: https://www.algolia.com/doc/api-reference/api-parameters/exactOnSingleWordQuery/ -
--mode
-
Search mode the index will use to query for results. One of: neuralSearch, keywordSearch.
See: https://www.algolia.com/doc/api-reference/api-parameters/mode/ -
--optionalWords
-
Words that should be considered optional when found in the query.
See: https://www.algolia.com/doc/api-reference/api-parameters/optionalWords/ -
--queryType
-
Determines if and how query words are interpreted as prefixes. One of: prefixLast, prefixAll, prefixNone.
See: https://www.algolia.com/doc/api-reference/api-parameters/queryType/ -
--removeWordsIfNoResults
-
Strategy for removing words from the query when it doesn’t return any results. One of: none, lastWords, firstWords, allOptional.
See: https://www.algolia.com/doc/api-reference/api-parameters/removeWordsIfNoResults/
Ranking
-
--customRanking
-
Attributes to use as custom ranking.
See: https://www.algolia.com/doc/api-reference/api-parameters/customRanking/ -
--ranking
-
Determines the order in which Algolia returns your results.
See: https://www.algolia.com/doc/api-reference/api-parameters/ranking/ -
--relevancyStrictness
-
Relevancy threshold below which less relevant results aren’t included in the results.
See: https://www.algolia.com/doc/api-reference/api-parameters/relevancyStrictness/
Rules
-
--enableRules
-
Whether to enable rules.
See: https://www.algolia.com/doc/api-reference/api-parameters/enableRules/ -
--ruleContexts
-
Assigns a rule context to the search query.
See: https://www.algolia.com/doc/api-reference/api-parameters/ruleContexts/
Search
-
--query
-
Search query.
See: https://www.algolia.com/doc/api-reference/api-parameters/query/ -
--similarQuery
-
Keywords to be used instead of the search query to conduct a more broader search.
See: https://www.algolia.com/doc/api-reference/api-parameters/similarQuery/
Typos
-
--allowTyposOnNumericTokens
-
Whether to allow typos on numbers in the search query.
See: https://www.algolia.com/doc/api-reference/api-parameters/allowTyposOnNumericTokens/ -
--disableTypoToleranceOnAttributes
-
Attributes for which you want to turn off typo tolerance.
See: https://www.algolia.com/doc/api-reference/api-parameters/disableTypoToleranceOnAttributes/ -
--minWordSizefor1Typo
-
Minimum number of characters a word in the search query must contain to accept matches with one typo.
See: https://www.algolia.com/doc/api-reference/api-parameters/minWordSizefor1Typo/ -
--minWordSizefor2Typos
-
Minimum number of characters a word in the search query must contain to accept matches with two typos.
See: https://www.algolia.com/doc/api-reference/api-parameters/minWordSizefor2Typos/ -
--typoTolerance
-
Whether typo tolerance is enabled and how it is applied.
See: https://www.algolia.com/doc/api-reference/api-parameters/typoTolerance/
algolia objects delete
algolia objects delete <index> [--object-ids <object-ids> | --filters <filters>...] [--confirm] [--wait] [flags]
Delete objects from an index.
Examples
1
2
3
4
5
6
7
8
9
# Delete one single object with the ID "1" from the "MOVIES" index
$ algolia objects delete MOVIES --object-ids 1
# Delete multiple objects with the IDs "1" and "2" from the "MOVIES" index
$ algolia objects delete MOVIES --object-ids 1,2
# Delete all objects matching the filters "type:Scripted" from the "MOVIES" index
$ algolia objects delete MOVIES --filters "type:Scripted" --confirm
Filtering
-
--facetFilters
-
Filter the search by facet values, so that only records with the same facet values are retrieved.
See: https://www.algolia.com/doc/api-reference/api-parameters/facetFilters/ -
--filters
-
Filter expression to only include items that match the filter criteria in the response.
See: https://www.algolia.com/doc/api-reference/api-parameters/filters/ -
--numericFilters
-
Filter by numeric facets.
See: https://www.algolia.com/doc/api-reference/api-parameters/numericFilters/ -
--tagFilters
-
Filter the search by values of the special _tags attribute.
See: https://www.algolia.com/doc/api-reference/api-parameters/tagFilters/
Geo-Search
-
--aroundLatLng
-
Coordinates for the center of a circle, expressed as a comma-separated string of latitude and longitude.
See: https://www.algolia.com/doc/api-reference/api-parameters/aroundLatLng/ -
--aroundRadius
-
Maximum radius for a search around a central location.
See: https://www.algolia.com/doc/api-reference/api-parameters/aroundRadius/
Other flags
-
-y
,--confirm
-
skip confirmation prompt
-
--object-ids
-
Object IDs to delete
-
--wait
-
wait for all the operations to complete before returning
algolia objects import
algolia objects import <index> -F <file> [flags]
Import objects to the specified index.
Examples
1
2
3
4
5
6
7
8
9
# Import objects from the "data.ndjson" file to the "MOVIES" index
$ algolia objects import MOVIES -F data.ndjson
# Import objects from the standard input to the "MOVIES" index
$ cat data.ndjson | algolia objects import MOVIES -F -
# Browse the objects in the "SERIES" index and import them to the "MOVIES" index
$ algolia objects browse SERIES | algolia objects import MOVIES -F -
Flags
-
--auto-generate-object-id-if-not-exist
-
Automatically generate object ID if not exist
-
-b
,--batch-size
-
Specify the upload batch size
-
-F
,--file
-
Read records to import from
file
(use “-“ to read from standard input)
algolia objects operations
algolia objects operations -F <file> [--wait] [--continue-on-errors] [flags]
Perform several indexing operations.
Examples
1
2
3
# Batch operations from the "operations.ndjson" file
$ algolia objects operations -F operations.ndjson
Flags
-
-C
,--continue-on-error
-
Continue processing operations even if some operations are invalid.
-
-F
,--file
-
The file to read the indexing operations from (use “-“ to read from standard input)
-
-w
,--wait
-
Wait for the indexing operation(s) to complete before returning.
algolia objects update
algolia objects update <index> -F <file> [--create-if-not-exists] [--wait] [--continue-on-error] [flags]
Update objects from a file to the specified index.
Examples
1
2
3
4
5
6
7
8
9
10
11
12
# Update objects from the "objects.ndjson" file to the "MOVIES" index
$ algolia objects update MOVIES -F objects.ndjson
# Update objects from the "objects.ndjson" file to the "MOVIES" index and create the objects if they don't exist
$ algolia objects update MOVIES -F objects.ndjson --create-if-not-exists
# Update objects from the "objects.ndjson" file to the "MOVIES" index and wait for the operation to complete
$ algolia objects update MOVIES -F objects.ndjson --wait
# Update objects from the "objects.ndjson" file to the "MOVIES" index and continue updating objects even if some objects are invalid
$ algolia objects update MOVIES -F objects.ndjson --continue-on-error
Flags
-
-C
,--continue-on-error
-
Continue updating objects even if some objects are invalid.
-
-c
,--create-if-not-exists
-
If provided, updating a nonexistent object will create a new object with the objectID and the attributes defined in the object
-
-F
,--file
-
Read objects to update from
file
(use “-“ to read from standard input) -
-w
,--wait
-
Wait for the operation to complete before returning