Struct elasticsearch_dsl::search::queries::term_level::RegexpQuery [−][src]
pub struct RegexpQuery { /* fields omitted */ }
Expand description
Returns documents that contain terms matching a regular expression.
A regular expression is a way to match patterns in data using placeholder characters, called
operators. For a list of operators supported by the regexp
query, see
Regular expression syntax.
To create a regexp query:
Query::regexp("test", "username");
https://www.elastic.co/guide/en/elasticsearch/reference/current/query-dsl-regexp-query.html
Implementations
Enables optional operators for the regular expression. For valid values and more information, see Regular expression syntax.
Allows case insensitive matching of the regular expression value with the indexed field
values when set to true
. Default is false
which means the case sensitivity of matching
depends on the underlying field’s mapping.
Maximum number of automaton states required for the query. Default is 10000.
Elasticsearch uses Apache Lucene internally to parse regular expressions. Lucene converts each regular expression to a finite automaton containing a number of determinized states.
You can use this parameter to prevent that conversion from unintentionally consuming too many resources. You may need to increase this limit to run complex regular expressions.
Method used to rewrite the query. For valid values and more information, see the rewrite parameter.
Floating point number used to decrease or increase the
relevance scores
of a query. Defaults to 1.0
.
You can use the boost parameter to adjust relevance scores for searches containing two or more queries.
Boost values are relative to the default value of 1.0
.
A boost value between 0 and 1.0
decreases the relevance score.
A value greater than 1.0
increases the relevance score.
You can use named queries to track which queries matched
returned documents. If named queries are used, the response
includes a matched_queries
property for each hit.
Trait Implementations
Performs the conversion.
Performs the conversion.
This method tests for self
and other
values to be equal, and is used
by ==
. Read more
This method tests for !=
.
Auto Trait Implementations
impl RefUnwindSafe for RegexpQuery
impl Send for RegexpQuery
impl Sync for RegexpQuery
impl Unpin for RegexpQuery
impl UnwindSafe for RegexpQuery
Blanket Implementations
Mutably borrows from an owned value. Read more