Class BaseIndexSettings

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

public class BaseIndexSettings extends Object
BaseIndexSettings
  • Constructor Details

    • BaseIndexSettings

      public BaseIndexSettings()
  • Method Details

    • setAttributesForFaceting

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

      public BaseIndexSettings addAttributesForFaceting(String attributesForFacetingItem)
    • getAttributesForFaceting

      @Nullable public List<String> getAttributesForFaceting()
      Attributes used for [faceting](https://www.algolia.com/doc/guides/managing-results/refine-results/faceting/). Facets are ways to categorize search results based on attributes. Facets can be used to let user filter search results. By default, no attribute is used for faceting. **Modifiers** - `filterOnly(\"ATTRIBUTE\")`. Allows using this attribute as a filter, but doesn't evalue the facet values. - `searchable(\"ATTRIBUTE\")`. Allows searching for facet values. - `afterDistinct(\"ATTRIBUTE\")`. Evaluates the facet count _after_ deduplication with `distinct`. This ensures accurate facet counts. You can apply this modifier to searchable facets: `afterDistinct(searchable(ATTRIBUTE))`.
    • setReplicas

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

      public BaseIndexSettings addReplicas(String replicasItem)
    • getReplicas

      @Nullable public List<String> getReplicas()
      Creates [replica indices](https://www.algolia.com/doc/guides/managing-results/refine-results/sorting/in-depth/replicas/). Replicas are copies of a primary index with the same records but different settings, synonyms, or rules. If you want to offer a different ranking or sorting of your search results, you'll use replica indices. All index operations on a primary index are automatically forwarded to its replicas. To add a replica index, you must provide the complete set of replicas to this parameter. If you omit a replica from this list, the replica turns into a regular, standalone index that will no longer by synced with the primary index. **Modifier** - `virtual(\"REPLICA\")`. Create a virtual replica, Virtual replicas don't increase the number of records and are optimized for [Relevant sorting](https://www.algolia.com/doc/guides/managing-results/refine-results/sorting/in-depth/relevant-sort/).
    • setPaginationLimitedTo

      public BaseIndexSettings setPaginationLimitedTo(Integer paginationLimitedTo)
    • getPaginationLimitedTo

      @Nullable public Integer getPaginationLimitedTo()
      Maximum number of search results that can be obtained through pagination. Higher pagination limits might slow down your search. For pagination limits above 1,000, the sorting of results beyond the 1,000th hit can't be guaranteed. maximum: 20000
    • setUnretrievableAttributes

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

      public BaseIndexSettings addUnretrievableAttributes(String unretrievableAttributesItem)
    • getUnretrievableAttributes

      @Nullable public List<String> getUnretrievableAttributes()
      Attributes that can't be retrieved at query time. This can be useful if you want to use an attribute for ranking or to [restrict access](https://www.algolia.com/doc/guides/security/api-keys/how-to/user-restricted-access-to-data/), but don't want to include it in the search results.
    • setDisableTypoToleranceOnWords

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

      public BaseIndexSettings 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/). This also turns off [word splitting and concatenation](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/splitting-and-concatenation/) for the specified words.
    • setAttributesToTransliterate

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

      public BaseIndexSettings addAttributesToTransliterate(String attributesToTransliterateItem)
    • getAttributesToTransliterate

      @Nullable public List<String> getAttributesToTransliterate()
      Attributes, for which you want to support [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). Transliteration supports searching in any of the Japanese writing systems. To support transliteration, you must set the indexing language to Japanese.
    • setCamelCaseAttributes

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

      public BaseIndexSettings addCamelCaseAttributes(String camelCaseAttributesItem)
    • getCamelCaseAttributes

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

      public BaseIndexSettings setDecompoundedAttributes(Object decompoundedAttributes)
    • getDecompoundedAttributes

      @Nullable public Object getDecompoundedAttributes()
      Searchable attributes to which Algolia should apply [word segmentation](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/how-to/customize-segmentation/) (decompounding). Compound words are formed by combining two or more individual words, and are particularly prevalent in Germanic languages—for example, \"firefighter\". With decompounding, the individual components are indexed separately. You can specify different lists for different languages. Decompounding is supported for these languages: Dutch (`nl`), German (`de`), Finnish (`fi`), Danish (`da`), Swedish (`sv`), and Norwegian (`no`).
    • setIndexLanguages

      public BaseIndexSettings setIndexLanguages(List<SupportedLanguage> indexLanguages)
    • addIndexLanguages

      public BaseIndexSettings addIndexLanguages(SupportedLanguage indexLanguagesItem)
    • getIndexLanguages

      @Nullable public List<SupportedLanguage> getIndexLanguages()
      Languages for language-specific processing steps, such as word detection and dictionary settings. **You should always specify an indexing language.** If you don't specify an indexing language, the search engine uses all [supported languages](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/supported-languages/), or the languages you specified with the `ignorePlurals` or `removeStopWords` parameters. This can lead to unexpected search results. For more information, see [Language-specific configuration](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/language-specific-configurations/).
    • setDisablePrefixOnAttributes

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

      public BaseIndexSettings addDisablePrefixOnAttributes(String disablePrefixOnAttributesItem)
    • getDisablePrefixOnAttributes

      @Nullable public List<String> getDisablePrefixOnAttributes()
      Searchable 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 BaseIndexSettings setAllowCompressionOfIntegerArray(Boolean allowCompressionOfIntegerArray)
    • getAllowCompressionOfIntegerArray

      @Nullable public Boolean getAllowCompressionOfIntegerArray()
      Whether arrays with exclusively non-negative integers should be compressed for better performance. If true, the compressed arrays may be reordered.
    • setNumericAttributesForFiltering

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

      public BaseIndexSettings 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). By default, all numeric attributes are available as numerical filters. For faster indexing, reduce the number of numeric attributes. If you want to turn off filtering for all numeric attributes, specifiy an attribute that doesn't exist in your index, such as `NO_NUMERIC_FILTERING`. **Modifier** - `equalOnly(\"ATTRIBUTE\")`. Support only filtering based on equality comparisons `=` and `!=`.
    • setSeparatorsToIndex

      public BaseIndexSettings setSeparatorsToIndex(String separatorsToIndex)
    • getSeparatorsToIndex

      @Nullable public String getSeparatorsToIndex()
      Controls which separators are indexed. Separators are all non-letter characters except spaces and currency characters, such as $€£¥. By default, separator characters aren't indexed. With `separatorsToIndex`, Algolia treats separator characters as separate words. For example, a search for `C#` would report two matches.
    • setSearchableAttributes

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

      public BaseIndexSettings addSearchableAttributes(String searchableAttributesItem)
    • getSearchableAttributes

      @Nullable public List<String> getSearchableAttributes()
      Attributes used for searching. By default, all attributes are searchable and the [Attribute](https://www.algolia.com/doc/guides/managing-results/relevance-overview/in-depth/ranking-criteria/#attribute) ranking criterion is turned off. With a non-empty list, Algolia only returns results with matches in the selected attributes. In addition, the Attribute ranking criterion is turned on: matches in attributes that are higher in the list of `searchableAttributes` rank first. To make matches in two attributes rank equally, include them in a comma-separated string, such as `\"title,alternate_title\"`. Attributes with the same priority are always unordered. For more information, see [Searchable attributes](https://www.algolia.com/doc/guides/sending-and-managing-data/prepare-your-data/how-to/setting-searchable-attributes/). **Modifier** - `unordered(\"ATTRIBUTE\")`. Ignore the position of a match within the attribute. Without modifier, matches at the beginning of an attribute rank higer than matches at the end.
    • setUserData

      public BaseIndexSettings setUserData(Object userData)
    • getUserData

      @Nullable public Object getUserData()
      An object with custom data. You can store up to 32 kB as custom data.
    • setCustomNormalization

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

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

      @Nullable public Map<String,Map<String,String>> getCustomNormalization()
      Characters and their normalized replacements. This overrides Algolia's default [normalization](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/normalization/).
    • setAttributeForDistinct

      public BaseIndexSettings setAttributeForDistinct(String attributeForDistinct)
    • getAttributeForDistinct

      @Nullable public String getAttributeForDistinct()
      Attribute that should be used to establish groups of results. All records with the same value for this attribute are considered a group. You can combine `attributeForDistinct` with the `distinct` search parameter to control how many items per group are included in the search results. If you want to use the same attribute also for faceting, use the `afterDistinct` modifier of the `attributesForFaceting` setting. This applies faceting _after_ deduplication, which will result in accurate facet counts.
    • 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