Class Consequence

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

public class Consequence extends Object
[Consequences](https://www.algolia.com/doc/guides/managing-results/rules/rules-overview/#consequences) of a rule.
  • Constructor Details

    • Consequence

      public Consequence()
  • Method Details

    • setParams

      public Consequence setParams(ConsequenceParams params)
    • getParams

      @Nullable public ConsequenceParams getParams()
      Get params
      Returns:
      params
    • setPromote

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

      public Consequence addPromote(Promote promoteItem)
    • getPromote

      @Nullable public List<Promote> getPromote()
      Records to promote.
      Returns:
      promote
    • setFilterPromotes

      public Consequence setFilterPromotes(Boolean filterPromotes)
    • getFilterPromotes

      @Nullable public Boolean getFilterPromotes()
      Only use in combination with the `promote` consequence. When `true`, promoted results will be restricted to match the filters of the current search. When `false`, the promoted results will show up regardless of the filters.
      Returns:
      filterPromotes
    • setHide

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

      public Consequence addHide(ConsequenceHide hideItem)
    • getHide

      @Nullable public List<ConsequenceHide> getHide()
      Records to hide. By default, you can hide up to 50 records per rule.
      Returns:
      hide
    • setUserData

      public Consequence setUserData(Object userData)
    • getUserData

      @Nullable public Object getUserData()
      Custom JSON object that will be appended to the userData array in the response. This object isn't interpreted by the API. It's limited to 1kB of minified JSON.
      Returns:
      userData
    • 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