QueryRewritesType Class

public final class QueryRewritesType
extends ExpandableStringEnum<QueryRewritesType>

This parameter is only valid if the query type is `semantic`. When QueryRewrites is set to `generative`, the query terms are sent to a generate model which will produce 10 (default) rewrites to help increase the recall of the request. The requested count can be configured by appending the pipe character `|` followed by the `count-<number of rewrites>` option, such as `generative|count-3`. Defaults to `None`.

Field Summary

Modifier and Type Field and Description
static final QueryRewritesType GENERATIVE

Generate alternative query terms to increase the recall of a search request.

static final QueryRewritesType NONE

Do not generate additional query rewrites for this query.

Constructor Summary

Constructor Description
QueryRewritesType()

Deprecated

Use the fromString(String name) factory method.

Creates a new instance of QueryRewritesType value.

Method Summary

Modifier and Type Method and Description
static QueryRewritesType fromString(String name)

Creates or finds a QueryRewritesType from its string representation.

static Collection<QueryRewritesType> values()

Gets known QueryRewritesType values.

Methods inherited from ExpandableStringEnum

Methods inherited from java.lang.Object

Field Details

GENERATIVE

public static final QueryRewritesType GENERATIVE

Generate alternative query terms to increase the recall of a search request.

NONE

public static final QueryRewritesType NONE

Do not generate additional query rewrites for this query.

Constructor Details

QueryRewritesType

@Deprecated
public QueryRewritesType()

Deprecated

Use the fromString(String name) factory method.

Creates a new instance of QueryRewritesType value.

Method Details

fromString

public static QueryRewritesType fromString(String name)

Creates or finds a QueryRewritesType from its string representation.

Parameters:

name - a name to look for.

Returns:

the corresponding QueryRewritesType.

values

public static Collection<QueryRewritesType> values()

Gets known QueryRewritesType values.

Returns:

known QueryRewritesType values.

Applies to