QueryType Class
- java.
lang. Object - com.
azure. core. util. ExpandableStringEnum<T> - com.
azure. search. documents. models. QueryType
- com.
- com.
public final class QueryType
extends ExpandableStringEnum<QueryType>
Specifies the syntax of the search query. The default is 'simple'. Use 'full' if your query uses the Lucene query syntax and 'semantic' if query syntax is not needed.
Field Summary
| Modifier and Type | Field and Description |
|---|---|
|
static final
Query |
FULL
Uses the full Lucene query syntax for searches. |
|
static final
Query |
SEMANTIC
Best suited for queries expressed in natural language as opposed to keywords. |
|
static final
Query |
SIMPLE
Uses the simple query syntax for searches. |
Constructor Summary
| Constructor | Description |
|---|---|
| QueryType() |
Deprecated
Use the fromString(String name) factory method.
Creates a new instance of Query |
Method Summary
| Modifier and Type | Method and Description |
|---|---|
|
static
Query |
fromString(String name)
Creates or finds a Query |
|
static
Collection<Query |
values()
Gets known Query |
Methods inherited from ExpandableStringEnum
Methods inherited from java.lang.Object
Field Details
FULL
public static final QueryType FULL
Uses the full Lucene query syntax for searches. Search text is interpreted using the Lucene query language which allows field-specific and weighted searches, as well as other advanced features.
SEMANTIC
public static final QueryType SEMANTIC
Best suited for queries expressed in natural language as opposed to keywords. Improves precision of search results by re-ranking the top search results using a ranking model trained on the Web corpus.
SIMPLE
public static final QueryType SIMPLE
Uses the simple query syntax for searches. Search text is interpreted using a simple query language that allows for symbols such as +, * and "". Queries are evaluated across all searchable fields by default, unless the searchFields parameter is specified.
Constructor Details
QueryType
@Deprecated
public QueryType()
Deprecated
Creates a new instance of QueryType value.
Method Details
fromString
public static QueryType fromString(String name)
Creates or finds a QueryType from its string representation.
Parameters:
Returns:
values
public static Collection<QueryType> values()
Gets known QueryType values.
Returns: