Class SourceIndex

java.lang.Object
com.algolia.model.querysuggestions.SourceIndex

public class SourceIndex extends Object
Configuration of an Algolia index for Query Suggestions.
  • Constructor Details

    • SourceIndex

      public SourceIndex()
  • Method Details

    • setIndexName

      public SourceIndex setIndexName(String indexName)
    • getIndexName

      @Nonnull public String getIndexName()
      Name of the Algolia index to use as source for query suggestions.
    • setReplicas

      public SourceIndex setReplicas(Boolean replicas)
    • getReplicas

      @Nullable public Boolean getReplicas()
      If true, Query Suggestions uses all replicas of the primary index to find popular searches. If false, only the primary index is used.
    • setAnalyticsTags

      public SourceIndex setAnalyticsTags(List<String> analyticsTags)
    • addAnalyticsTags

      public SourceIndex addAnalyticsTags(String analyticsTagsItem)
    • getAnalyticsTags

      @Nullable public List<String> getAnalyticsTags()
      [Analytics tags](https://www.algolia.com/doc/api-reference/api-parameters/analyticsTags/) for filtering the popular searches.
    • setFacets

      public SourceIndex setFacets(List<Facet> facets)
    • addFacets

      public SourceIndex addFacets(Facet facetsItem)
    • getFacets

      @Nullable public List<Facet> getFacets()
      Facets to use as top categories with your suggestions. If provided, Query Suggestions adds the top facet values to each suggestion.
    • setMinHits

      public SourceIndex setMinHits(Integer minHits)
    • getMinHits

      @Nullable public Integer getMinHits()
      Minimum number of hits required to be included as a suggestion. A search query must at least generate `minHits` hits to be included in the Query Suggestions index. minimum: 0
    • setMinLetters

      public SourceIndex setMinLetters(Integer minLetters)
    • getMinLetters

      @Nullable public Integer getMinLetters()
      Minimum letters required to be included as a suggestion. A search query must be at least `minLetters` long to be included in the Query Suggestions index. minimum: 0
    • setGenerate

      public SourceIndex setGenerate(List<List<String>> generate)
    • addGenerate

      public SourceIndex addGenerate(List<String> generateItem)
    • getGenerate

      @Nullable public List<List<String>> getGenerate()
      Get generate
    • setExternal

      public SourceIndex setExternal(List<String> external)
    • addExternal

      public SourceIndex addExternal(String externalItem)
    • getExternal

      @Nullable public List<String> getExternal()
      Algolia indices with popular searches to use as query suggestions. Records of these indices must have these attributes: - `query`: search query which will be added as a suggestion - `count`: measure of popularity of that search query For example, you can export popular searches from an external analytics tool, such as Google Analytics or Adobe Analytics, and feed this data into an external Algolia index. You can use this external index to generate query suggestions until your Algolia analytics has collected enough data.
    • 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