Class Consequence

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

public class Consequence extends Object
Effect of the rule. For more information, see [Consequences](https://www.algolia.com/doc/guides/managing-results/rules/rules-overview/#consequences).
  • Constructor Details

    • Consequence

      public Consequence()
  • Method Details

    • setParams

      public Consequence setParams(ConsequenceParams params)
    • getParams

      @Nullable public ConsequenceParams getParams()
      Get params
    • setPromote

      public Consequence setPromote(List<Promote> promote)
    • addPromote

      public Consequence addPromote(Promote promoteItem)
    • getPromote

      @Nullable public List<Promote> getPromote()
      Records you want to pin to a specific position in the search results. You can promote up to 300 records, either individually, or as groups of up to 100 records each.
    • setFilterPromotes

      public Consequence setFilterPromotes(Boolean filterPromotes)
    • getFilterPromotes

      @Nullable public Boolean getFilterPromotes()
      Whether promoted records must match an active filter for the consequence to be applied. This ensures that user actions (filtering the search) are given a higher precendence. For example, if you promote a record with the `color: red` attribute, and the user filters the search for `color: blue`, the \"red\" record won't be shown.
    • setHide

      public Consequence setHide(List<ConsequenceHide> hide)
    • addHide

      public Consequence addHide(ConsequenceHide hideItem)
    • getHide

      @Nullable public List<ConsequenceHide> getHide()
      Records you want to hide from the search results.
    • setUserData

      public Consequence setUserData(Object userData)
    • getUserData

      @Nullable public Object getUserData()
      A JSON object with custom data that will be appended to the `userData` array in the response. This object isn't interpreted by the API and is limited to 1 kB of minified JSON.
    • 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