Class AutoCompletionEntry.AutoCompletionEntryBuilder
- java.lang.Object
-
- com.funnelback.plugin.index.model.querycompletion.AutoCompletionEntry.AutoCompletionEntryBuilder
-
- Enclosing class:
- AutoCompletionEntry
public static class AutoCompletionEntry.AutoCompletionEntryBuilder extends Object
-
-
Field Summary
Fields Modifier and Type Field Description private boolean
action$set
private AutoCompletionAction
action$value
private boolean
category$set
private String
category$value
private boolean
display$set
private AutoCompletionDisplay
display$value
private ArrayList<String>
triggers
private boolean
weight$set
private Double
weight$value
-
Constructor Summary
Constructors Constructor Description AutoCompletionEntryBuilder()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description AutoCompletionEntry.AutoCompletionEntryBuilder
action(@NonNull AutoCompletionAction action)
Action that will be performed when the user selects this suggestion.AutoCompletionEntry
build()
AutoCompletionEntry.AutoCompletionEntryBuilder
category(@NonNull String category)
The category of the suggestion.AutoCompletionEntry.AutoCompletionEntryBuilder
clearTriggers()
AutoCompletionEntry.AutoCompletionEntryBuilder
display(@NonNull AutoCompletionDisplay display)
This is what will be displayed to the user for this suggestion.String
toString()
AutoCompletionEntry.AutoCompletionEntryBuilder
trigger(String trigger)
AutoCompletionEntry.AutoCompletionEntryBuilder
triggers(Collection<? extends String> triggers)
AutoCompletionEntry.AutoCompletionEntryBuilder
weight(@NonNull Double weight)
Used to rank suggestions which matches the partial query, in case multiple suggestion matches a given partial query.
-
-
-
Field Detail
-
weight$set
private boolean weight$set
-
weight$value
private Double weight$value
-
display$set
private boolean display$set
-
display$value
private AutoCompletionDisplay display$value
-
category$set
private boolean category$set
-
category$value
private String category$value
-
action$set
private boolean action$set
-
action$value
private AutoCompletionAction action$value
-
-
Method Detail
-
trigger
public AutoCompletionEntry.AutoCompletionEntryBuilder trigger(String trigger)
-
triggers
public AutoCompletionEntry.AutoCompletionEntryBuilder triggers(Collection<? extends String> triggers)
-
clearTriggers
public AutoCompletionEntry.AutoCompletionEntryBuilder clearTriggers()
-
weight
public AutoCompletionEntry.AutoCompletionEntryBuilder weight(@NonNull @NonNull Double weight)
Used to rank suggestions which matches the partial query, in case multiple suggestion matches a given partial query. The expected range is 0-999. If the partial query is "do", both "dog" and "donut" will be returned. The one with the higher weight will be returned first (assuming the auto-completion sort option is set to sort by score).- Returns:
this
.
-
display
public AutoCompletionEntry.AutoCompletionEntryBuilder display(@NonNull @NonNull AutoCompletionDisplay display)
This is what will be displayed to the user for this suggestion. See the concrete classes in com.funnelback.plugin.index.model.querycompletion.display for available options.- Returns:
this
.
-
category
public AutoCompletionEntry.AutoCompletionEntryBuilder category(@NonNull @NonNull String category)
The category of the suggestion. This field allows to classify suggestion in multiple categories. If the suggestion concerns a product, you could use "Product" here. All the suggestions with the same category will be displayed under the same category header in the search result page.- Returns:
this
.
-
action
public AutoCompletionEntry.AutoCompletionEntryBuilder action(@NonNull @NonNull AutoCompletionAction action)
Action that will be performed when the user selects this suggestion. It can be: See the concrete classes in com.funnelback.plugin.index.model.querycompletion.action for available options.- Returns:
this
.
-
build
public AutoCompletionEntry build()
-
-