Package com.algolia.model.search
Class Consequence
java.lang.Object
com.algolia.model.search.Consequence
Effect of the rule. For more information, see
[Consequences](https://www.algolia.com/doc/guides/managing-results/rules/rules-overview/#consequences).
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionaddHide
(ConsequenceHide hideItem) addPromote
(Promote promoteItem) boolean
Whether promoted records must match an active filter for the consequence to be applied.getHide()
Records you want to hide from the search results.Get paramsRecords you want to pin to a specific position in the search results.A JSON object with custom data that will be appended to the `userData` array in the response.int
hashCode()
setFilterPromotes
(Boolean filterPromotes) setHide
(List<ConsequenceHide> hide) setParams
(ConsequenceParams params) setPromote
(List<Promote> promote) setUserData
(Object userData) toString()
-
Constructor Details
-
Consequence
public Consequence()
-
-
Method Details
-
setParams
-
getParams
Get params -
setPromote
-
addPromote
-
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
-
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
-
addHide
-
getHide
Records you want to hide from the search results. -
setUserData
-
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
-
hashCode
public int hashCode() -
toString
-