Class CategoryQueryContext.Builder
- java.lang.Object
-
- org.elasticsearch.search.suggest.completion.context.CategoryQueryContext.Builder
-
- Enclosing class:
- CategoryQueryContext
public static class CategoryQueryContext.Builder extends java.lang.Object
-
-
Constructor Summary
Constructors Constructor Description Builder()
-
Method Summary
Modifier and Type Method Description CategoryQueryContext
build()
CategoryQueryContext.Builder
setBoost(int boost)
Sets the query-time boost of the context.CategoryQueryContext.Builder
setCategory(java.lang.String category)
Sets the category of the category.CategoryQueryContext.Builder
setPrefix(boolean prefix)
Sets if the context should be treated as a prefix or not.
-
-
-
Method Detail
-
setCategory
public CategoryQueryContext.Builder setCategory(java.lang.String category)
Sets the category of the category. This is a required field
-
setPrefix
public CategoryQueryContext.Builder setPrefix(boolean prefix)
Sets if the context should be treated as a prefix or not. Defaults to false
-
setBoost
public CategoryQueryContext.Builder setBoost(int boost)
Sets the query-time boost of the context. Defaults to 1.
-
build
public CategoryQueryContext build()
-
-