Class IndexSettings

java.lang.Object
com.algolia.model.search.IndexSettings

public class IndexSettings extends Object
Algolia index settings.
  • Constructor Details

    • IndexSettings

      public IndexSettings()
  • Method Details

    • setReplicas

      public IndexSettings setReplicas(List<String> replicas)
    • addReplicas

      public IndexSettings addReplicas(String replicasItem)
    • getReplicas

      @Nullable public List<String> getReplicas()
      Creates [replicas](https://www.algolia.com/doc/guides/managing-results/refine-results/sorting/in-depth/replicas/), which are copies of a primary index with the same records but different settings.
    • setPaginationLimitedTo

      public IndexSettings setPaginationLimitedTo(Integer paginationLimitedTo)
    • getPaginationLimitedTo

      @Nullable public Integer getPaginationLimitedTo()
      Maximum number of hits accessible through pagination.
    • setUnretrievableAttributes

      public IndexSettings setUnretrievableAttributes(List<String> unretrievableAttributes)
    • addUnretrievableAttributes

      public IndexSettings addUnretrievableAttributes(String unretrievableAttributesItem)
    • getUnretrievableAttributes

      @Nullable public List<String> getUnretrievableAttributes()
      Attributes that can't be retrieved at query time.
    • setDisableTypoToleranceOnWords

      public IndexSettings setDisableTypoToleranceOnWords(List<String> disableTypoToleranceOnWords)
    • addDisableTypoToleranceOnWords

      public IndexSettings addDisableTypoToleranceOnWords(String disableTypoToleranceOnWordsItem)
    • getDisableTypoToleranceOnWords

      @Nullable public List<String> getDisableTypoToleranceOnWords()
      Words for which you want to turn off [typo tolerance](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/typo-tolerance/).
    • setAttributesToTransliterate

      public IndexSettings setAttributesToTransliterate(List<String> attributesToTransliterate)
    • addAttributesToTransliterate

      public IndexSettings addAttributesToTransliterate(String attributesToTransliterateItem)
    • getAttributesToTransliterate

      @Nullable public List<String> getAttributesToTransliterate()
      Attributes in your index to which [Japanese transliteration](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/language-specific-configurations/#japanese-transliteration-and-type-ahead) applies. This will ensure that words indexed in Katakana or Kanji can also be searched in Hiragana.
    • setCamelCaseAttributes

      public IndexSettings setCamelCaseAttributes(List<String> camelCaseAttributes)
    • addCamelCaseAttributes

      public IndexSettings addCamelCaseAttributes(String camelCaseAttributesItem)
    • getCamelCaseAttributes

      @Nullable public List<String> getCamelCaseAttributes()
      Attributes on which to split [camel case](https://wikipedia.org/wiki/Camel_case) words.
    • setDecompoundedAttributes

      public IndexSettings setDecompoundedAttributes(Object decompoundedAttributes)
    • getDecompoundedAttributes

      @Nullable public Object getDecompoundedAttributes()
      Attributes in your index to which [word segmentation](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/how-to/customize-segmentation/) (decompounding) applies.
    • setIndexLanguages

      public IndexSettings setIndexLanguages(List<String> indexLanguages)
    • addIndexLanguages

      public IndexSettings addIndexLanguages(String indexLanguagesItem)
    • getIndexLanguages

      @Nullable public List<String> getIndexLanguages()
      Set the languages of your index, for language-specific processing steps such as [tokenization](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/tokenization/) and [normalization](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/normalization/).
    • setDisablePrefixOnAttributes

      public IndexSettings setDisablePrefixOnAttributes(List<String> disablePrefixOnAttributes)
    • addDisablePrefixOnAttributes

      public IndexSettings addDisablePrefixOnAttributes(String disablePrefixOnAttributesItem)
    • getDisablePrefixOnAttributes

      @Nullable public List<String> getDisablePrefixOnAttributes()
      Attributes for which you want to turn off [prefix matching](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/override-search-engine-defaults/#adjusting-prefix-search).
    • setAllowCompressionOfIntegerArray

      public IndexSettings setAllowCompressionOfIntegerArray(Boolean allowCompressionOfIntegerArray)
    • getAllowCompressionOfIntegerArray

      @Nullable public Boolean getAllowCompressionOfIntegerArray()
      Incidates whether the engine compresses arrays with exclusively non-negative integers. When enabled, the compressed arrays may be reordered.
    • setNumericAttributesForFiltering

      public IndexSettings setNumericAttributesForFiltering(List<String> numericAttributesForFiltering)
    • addNumericAttributesForFiltering

      public IndexSettings addNumericAttributesForFiltering(String numericAttributesForFilteringItem)
    • getNumericAttributesForFiltering

      @Nullable public List<String> getNumericAttributesForFiltering()
      Numeric attributes that can be used as [numerical filters](https://www.algolia.com/doc/guides/managing-results/rules/detecting-intent/how-to/applying-a-custom-filter-for-a-specific-query/#numerical-filters).
    • setSeparatorsToIndex

      public IndexSettings setSeparatorsToIndex(String separatorsToIndex)
    • getSeparatorsToIndex

      @Nullable public String getSeparatorsToIndex()
      Controls which separators are added to an Algolia index as part of [normalization](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/#what-does-normalization-mean). Separators are all non-letter characters except spaces and currency characters, such as $€£¥.
    • setSearchableAttributes

      public IndexSettings setSearchableAttributes(List<String> searchableAttributes)
    • addSearchableAttributes

      public IndexSettings addSearchableAttributes(String searchableAttributesItem)
    • getSearchableAttributes

      @Nullable public List<String> getSearchableAttributes()
      [Attributes used for searching](https://www.algolia.com/doc/guides/managing-results/must-do/searchable-attributes/), including determining [if matches at the beginning of a word are important (ordered) or not (unordered)](https://www.algolia.com/doc/guides/managing-results/must-do/searchable-attributes/how-to/configuring-searchable-attributes-the-right-way/#understanding-word-position).
    • setUserData

      public IndexSettings setUserData(Object userData)
    • getUserData

      @Nullable public Object getUserData()
      Lets you store custom data in your indices.
    • setCustomNormalization

      public IndexSettings setCustomNormalization(Map<String,Map<String,String>> customNormalization)
    • putCustomNormalization

      public IndexSettings putCustomNormalization(String key, Map<String,String> customNormalizationItem)
    • getCustomNormalization

      @Nullable public Map<String,Map<String,String>> getCustomNormalization()
      A list of characters and their normalized replacements to override Algolia's default [normalization](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/normalization/).
    • setAttributesForFaceting

      public IndexSettings setAttributesForFaceting(List<String> attributesForFaceting)
    • addAttributesForFaceting

      public IndexSettings addAttributesForFaceting(String attributesForFacetingItem)
    • getAttributesForFaceting

      @Nullable public List<String> getAttributesForFaceting()
      Attributes used for [faceting](https://www.algolia.com/doc/guides/managing-results/refine-results/faceting/) and the [modifiers](https://www.algolia.com/doc/api-reference/api-parameters/attributesForFaceting/#modifiers) that can be applied: `filterOnly`, `searchable`, and `afterDistinct`.
    • setAttributesToRetrieve

      public IndexSettings setAttributesToRetrieve(List<String> attributesToRetrieve)
    • addAttributesToRetrieve

      public IndexSettings addAttributesToRetrieve(String attributesToRetrieveItem)
    • getAttributesToRetrieve

      @Nullable public List<String> getAttributesToRetrieve()
      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.
    • setRanking

      public IndexSettings setRanking(List<String> ranking)
    • addRanking

      public IndexSettings addRanking(String rankingItem)
    • getRanking

      @Nullable public List<String> getRanking()
      Determines the order in which Algolia [returns your results](https://www.algolia.com/doc/guides/managing-results/relevance-overview/in-depth/ranking-criteria/).
    • setCustomRanking

      public IndexSettings setCustomRanking(List<String> customRanking)
    • addCustomRanking

      public IndexSettings addCustomRanking(String customRankingItem)
    • getCustomRanking

      @Nullable public List<String> getCustomRanking()
      Specifies the [Custom ranking criterion](https://www.algolia.com/doc/guides/managing-results/must-do/custom-ranking/). Use the `asc` and `desc` modifiers to specify the ranking order: ascending or descending.
    • setRelevancyStrictness

      public IndexSettings setRelevancyStrictness(Integer relevancyStrictness)
    • getRelevancyStrictness

      @Nullable public Integer getRelevancyStrictness()
      Relevancy threshold below which less relevant results aren't included in the results.
    • setAttributesToHighlight

      public IndexSettings setAttributesToHighlight(List<String> attributesToHighlight)
    • addAttributesToHighlight

      public IndexSettings addAttributesToHighlight(String attributesToHighlightItem)
    • getAttributesToHighlight

      @Nullable public List<String> getAttributesToHighlight()
      Attributes to highlight. Strings that match the search query in the attributes are highlighted by surrounding them with HTML tags (`highlightPreTag` and `highlightPostTag`).
    • setAttributesToSnippet

      public IndexSettings setAttributesToSnippet(List<String> attributesToSnippet)
    • addAttributesToSnippet

      public IndexSettings addAttributesToSnippet(String attributesToSnippetItem)
    • getAttributesToSnippet

      @Nullable public List<String> getAttributesToSnippet()
      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`.
    • setHighlightPreTag

      public IndexSettings setHighlightPreTag(String highlightPreTag)
    • getHighlightPreTag

      @Nullable public String getHighlightPreTag()
      HTML string to insert before the highlighted parts in all highlight and snippet results.
    • setHighlightPostTag

      public IndexSettings setHighlightPostTag(String highlightPostTag)
    • getHighlightPostTag

      @Nullable public String getHighlightPostTag()
      HTML string to insert after the highlighted parts in all highlight and snippet results.
    • setSnippetEllipsisText

      public IndexSettings setSnippetEllipsisText(String snippetEllipsisText)
    • getSnippetEllipsisText

      @Nullable public String getSnippetEllipsisText()
      String used as an ellipsis indicator when a snippet is truncated.
    • setRestrictHighlightAndSnippetArrays

      public IndexSettings setRestrictHighlightAndSnippetArrays(Boolean restrictHighlightAndSnippetArrays)
    • getRestrictHighlightAndSnippetArrays

      @Nullable public Boolean getRestrictHighlightAndSnippetArrays()
      Restrict highlighting and snippeting to items that matched the query.
    • setHitsPerPage

      public IndexSettings setHitsPerPage(Integer hitsPerPage)
    • getHitsPerPage

      @Nullable public Integer getHitsPerPage()
      Number of hits per page. minimum: 1 maximum: 1000
    • setMinWordSizefor1Typo

      public IndexSettings setMinWordSizefor1Typo(Integer minWordSizefor1Typo)
    • getMinWordSizefor1Typo

      @Nullable public Integer getMinWordSizefor1Typo()
      Minimum number of characters a word in the query string must contain to accept matches with [one typo](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/typo-tolerance/in-depth/configuring-typo-tolerance/#configuring-word-length-for-typos).
    • setMinWordSizefor2Typos

      public IndexSettings setMinWordSizefor2Typos(Integer minWordSizefor2Typos)
    • getMinWordSizefor2Typos

      @Nullable public Integer getMinWordSizefor2Typos()
      Minimum number of characters a word in the query string must contain to accept matches with [two typos](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/typo-tolerance/in-depth/configuring-typo-tolerance/#configuring-word-length-for-typos).
    • setTypoTolerance

      public IndexSettings setTypoTolerance(TypoTolerance typoTolerance)
    • getTypoTolerance

      @Nullable public TypoTolerance getTypoTolerance()
      Get typoTolerance
    • setAllowTyposOnNumericTokens

      public IndexSettings setAllowTyposOnNumericTokens(Boolean allowTyposOnNumericTokens)
    • getAllowTyposOnNumericTokens

      @Nullable public Boolean getAllowTyposOnNumericTokens()
      Whether to allow typos on numbers (\"numeric tokens\") in the query string.
    • setDisableTypoToleranceOnAttributes

      public IndexSettings setDisableTypoToleranceOnAttributes(List<String> disableTypoToleranceOnAttributes)
    • addDisableTypoToleranceOnAttributes

      public IndexSettings addDisableTypoToleranceOnAttributes(String disableTypoToleranceOnAttributesItem)
    • getDisableTypoToleranceOnAttributes

      @Nullable public List<String> getDisableTypoToleranceOnAttributes()
      Attributes for which you want to turn off [typo tolerance](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/typo-tolerance/).
    • setIgnorePlurals

      public IndexSettings setIgnorePlurals(IgnorePlurals ignorePlurals)
    • getIgnorePlurals

      @Nullable public IgnorePlurals getIgnorePlurals()
      Get ignorePlurals
    • setRemoveStopWords

      public IndexSettings setRemoveStopWords(RemoveStopWords removeStopWords)
    • getRemoveStopWords

      @Nullable public RemoveStopWords getRemoveStopWords()
      Get removeStopWords
    • setKeepDiacriticsOnCharacters

      public IndexSettings setKeepDiacriticsOnCharacters(String keepDiacriticsOnCharacters)
    • getKeepDiacriticsOnCharacters

      @Nullable public String getKeepDiacriticsOnCharacters()
      Characters that the engine shouldn't automatically [normalize](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/normalization/).
    • setQueryLanguages

      public IndexSettings setQueryLanguages(List<String> queryLanguages)
    • addQueryLanguages

      public IndexSettings addQueryLanguages(String queryLanguagesItem)
    • getQueryLanguages

      @Nullable public List<String> getQueryLanguages()
      Sets your user's search language. This adjusts language-specific settings and features such as `ignorePlurals`, `removeStopWords`, and [CJK](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/normalization/#normalization-for-logogram-based-languages-cjk) word detection.
    • setDecompoundQuery

      public IndexSettings setDecompoundQuery(Boolean decompoundQuery)
    • getDecompoundQuery

      @Nullable public Boolean getDecompoundQuery()
      [Splits compound words](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/language-specific-configurations/#splitting-compound-words) into their component word parts in the query.
    • setEnableRules

      public IndexSettings setEnableRules(Boolean enableRules)
    • getEnableRules

      @Nullable public Boolean getEnableRules()
      Incidates whether [Rules](https://www.algolia.com/doc/guides/managing-results/rules/rules-overview/) are enabled.
    • setEnablePersonalization

      public IndexSettings setEnablePersonalization(Boolean enablePersonalization)
    • getEnablePersonalization

      @Nullable public Boolean getEnablePersonalization()
      Incidates whether [Personalization](https://www.algolia.com/doc/guides/personalization/what-is-personalization/) is enabled.
    • setQueryType

      public IndexSettings setQueryType(QueryType queryType)
    • getQueryType

      @Nullable public QueryType getQueryType()
      Get queryType
    • setRemoveWordsIfNoResults

      public IndexSettings setRemoveWordsIfNoResults(RemoveWordsIfNoResults removeWordsIfNoResults)
    • getRemoveWordsIfNoResults

      @Nullable public RemoveWordsIfNoResults getRemoveWordsIfNoResults()
      Get removeWordsIfNoResults
    • setMode

      public IndexSettings setMode(Mode mode)
    • getMode

      @Nullable public Mode getMode()
      Get mode
    • setSemanticSearch

      public IndexSettings setSemanticSearch(SemanticSearch semanticSearch)
    • getSemanticSearch

      @Nullable public SemanticSearch getSemanticSearch()
      Get semanticSearch
    • setAdvancedSyntax

      public IndexSettings setAdvancedSyntax(Boolean advancedSyntax)
    • getAdvancedSyntax

      @Nullable public Boolean getAdvancedSyntax()
      Enables the [advanced query syntax](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/override-search-engine-defaults/#advanced-syntax).
    • setOptionalWords

      public IndexSettings setOptionalWords(List<String> optionalWords)
    • addOptionalWords

      public IndexSettings addOptionalWords(String optionalWordsItem)
    • getOptionalWords

      @Nullable public List<String> getOptionalWords()
      Words which should be considered [optional](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/empty-or-insufficient-results/#creating-a-list-of-optional-words) when found in a query.
    • setDisableExactOnAttributes

      public IndexSettings setDisableExactOnAttributes(List<String> disableExactOnAttributes)
    • addDisableExactOnAttributes

      public IndexSettings addDisableExactOnAttributes(String disableExactOnAttributesItem)
    • getDisableExactOnAttributes

      @Nullable public List<String> getDisableExactOnAttributes()
      Attributes for which you want to [turn off the exact ranking criterion](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/override-search-engine-defaults/in-depth/adjust-exact-settings/#turn-off-exact-for-some-attributes).
    • setExactOnSingleWordQuery

      public IndexSettings setExactOnSingleWordQuery(ExactOnSingleWordQuery exactOnSingleWordQuery)
    • getExactOnSingleWordQuery

      @Nullable public ExactOnSingleWordQuery getExactOnSingleWordQuery()
      Get exactOnSingleWordQuery
    • setAlternativesAsExact

      public IndexSettings setAlternativesAsExact(List<AlternativesAsExact> alternativesAsExact)
    • addAlternativesAsExact

      public IndexSettings addAlternativesAsExact(AlternativesAsExact alternativesAsExactItem)
    • getAlternativesAsExact

      @Nullable public List<AlternativesAsExact> getAlternativesAsExact()
      Alternatives that should be considered an exact match by [the exact ranking criterion](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/override-search-engine-defaults/in-depth/adjust-exact-settings/#turn-off-exact-for-some-attributes).
    • setAdvancedSyntaxFeatures

      public IndexSettings setAdvancedSyntaxFeatures(List<AdvancedSyntaxFeatures> advancedSyntaxFeatures)
    • addAdvancedSyntaxFeatures

      public IndexSettings addAdvancedSyntaxFeatures(AdvancedSyntaxFeatures advancedSyntaxFeaturesItem)
    • getAdvancedSyntaxFeatures

      @Nullable public List<AdvancedSyntaxFeatures> getAdvancedSyntaxFeatures()
      Allows you to specify which advanced syntax features are active when `advancedSyntax` is enabled.
    • setDistinct

      public IndexSettings setDistinct(Distinct distinct)
    • getDistinct

      @Nullable public Distinct getDistinct()
      Get distinct
    • setAttributeForDistinct

      public IndexSettings setAttributeForDistinct(String attributeForDistinct)
    • getAttributeForDistinct

      @Nullable public String getAttributeForDistinct()
      Name of the deduplication attribute to be used with Algolia's [_distinct_ feature](https://www.algolia.com/doc/guides/managing-results/refine-results/grouping/#introducing-algolias-distinct-feature).
    • setReplaceSynonymsInHighlight

      public IndexSettings setReplaceSynonymsInHighlight(Boolean replaceSynonymsInHighlight)
    • getReplaceSynonymsInHighlight

      @Nullable public Boolean getReplaceSynonymsInHighlight()
      Whether to highlight and snippet the original word that matches the synonym or the synonym itself.
    • setMinProximity

      public IndexSettings setMinProximity(Integer minProximity)
    • getMinProximity

      @Nullable public Integer getMinProximity()
      Precision of the [proximity ranking criterion](https://www.algolia.com/doc/guides/managing-results/relevance-overview/in-depth/ranking-criteria/#proximity). minimum: 1 maximum: 7
    • setResponseFields

      public IndexSettings setResponseFields(List<String> responseFields)
    • addResponseFields

      public IndexSettings addResponseFields(String responseFieldsItem)
    • getResponseFields

      @Nullable public List<String> getResponseFields()
      Attributes to include in the API response for search and browse queries.
    • setMaxFacetHits

      public IndexSettings setMaxFacetHits(Integer maxFacetHits)
    • getMaxFacetHits

      @Nullable public Integer getMaxFacetHits()
      Maximum number of facet hits to return when [searching for facet values](https://www.algolia.com/doc/guides/managing-results/refine-results/faceting/#search-for-facet-values). maximum: 100
    • setMaxValuesPerFacet

      public IndexSettings setMaxValuesPerFacet(Integer maxValuesPerFacet)
    • getMaxValuesPerFacet

      @Nullable public Integer getMaxValuesPerFacet()
      Maximum number of facet values to return for each facet.
    • setSortFacetValuesBy

      public IndexSettings setSortFacetValuesBy(String sortFacetValuesBy)
    • getSortFacetValuesBy

      @Nullable public String getSortFacetValuesBy()
      Controls how facet values are fetched.
    • setAttributeCriteriaComputedByMinProximity

      public IndexSettings setAttributeCriteriaComputedByMinProximity(Boolean attributeCriteriaComputedByMinProximity)
    • getAttributeCriteriaComputedByMinProximity

      @Nullable public Boolean getAttributeCriteriaComputedByMinProximity()
      When the [Attribute criterion is ranked above Proximity](https://www.algolia.com/doc/guides/managing-results/relevance-overview/in-depth/ranking-criteria/#attribute-and-proximity-combinations) in your ranking formula, Proximity is used to select which searchable attribute is matched in the Attribute ranking stage.
    • setRenderingContent

      public IndexSettings setRenderingContent(RenderingContent renderingContent)
    • getRenderingContent

      @Nullable public RenderingContent getRenderingContent()
      Get renderingContent
    • setEnableReRanking

      public IndexSettings setEnableReRanking(Boolean enableReRanking)
    • getEnableReRanking

      @Nullable public Boolean getEnableReRanking()
      Indicates whether this search will use [Dynamic Re-Ranking](https://www.algolia.com/doc/guides/algolia-ai/re-ranking/).
    • setReRankingApplyFilter

      public IndexSettings setReRankingApplyFilter(ReRankingApplyFilter reRankingApplyFilter)
    • getReRankingApplyFilter

      @Nullable public ReRankingApplyFilter getReRankingApplyFilter()
      Get reRankingApplyFilter
    • equals

      public boolean equals(Object o)
      Overrides:
      equals in class Object
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object
    • toString

      public String toString()
      Overrides:
      toString in class Object