Enum elasticsearch_dsl::search::queries::params::RegexpFlag
source · pub enum RegexpFlag {
All,
Complement,
Interval,
Intersection,
Anystring,
}
Expand description
You can use the flags parameter to enable more optional operators for Lucene’s regular expression engine.
Variants§
All
Enables all optional operators.
Complement
Enables the ~
operator. You can use ~
to negate the shortest following pattern.
For example:
a~bc # matches 'adc' and 'aec' but not 'abc'
Interval
Enables the <>
operators. You can use <>
to match a numeric range. For example:
foo<1-100> # matches 'foo1', 'foo2' ... 'foo99', 'foo100'
foo<01-100> # matches 'foo01', 'foo02' ... 'foo99', 'foo100'
Intersection
Enables the &
operator, which acts as an AND operator. The match will succeed if patterns
on both the left side AND the right side matches. For example:
aaa.+&.+bbb # matches 'aaabbb'
Anystring
Enables the @
operator. You can use @ to match any entire string.
You can combine the @
operator with &
and ~
operators to create an
“everything except” logic. For example:
@&~(abc.+) # matches everything except terms beginning with 'abc'
Trait Implementations§
source§impl Clone for RegexpFlag
impl Clone for RegexpFlag
source§fn clone(&self) -> RegexpFlag
fn clone(&self) -> RegexpFlag
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moresource§impl Debug for RegexpFlag
impl Debug for RegexpFlag
source§impl Display for RegexpFlag
impl Display for RegexpFlag
source§impl From<RegexpFlag> for &'static str
impl From<RegexpFlag> for &'static str
source§fn from(value: RegexpFlag) -> Self
fn from(value: RegexpFlag) -> Self
source§impl From<RegexpFlag> for String
impl From<RegexpFlag> for String
source§fn from(value: RegexpFlag) -> Self
fn from(value: RegexpFlag) -> Self
source§impl Ord for RegexpFlag
impl Ord for RegexpFlag
source§fn cmp(&self, other: &RegexpFlag) -> Ordering
fn cmp(&self, other: &RegexpFlag) -> Ordering
1.21.0 · source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere Self: Sized,
source§impl PartialEq<RegexpFlag> for RegexpFlag
impl PartialEq<RegexpFlag> for RegexpFlag
source§fn eq(&self, other: &RegexpFlag) -> bool
fn eq(&self, other: &RegexpFlag) -> bool
self
and other
values to be equal, and is used
by ==
.source§impl PartialOrd<RegexpFlag> for RegexpFlag
impl PartialOrd<RegexpFlag> for RegexpFlag
source§fn partial_cmp(&self, other: &RegexpFlag) -> Option<Ordering>
fn partial_cmp(&self, other: &RegexpFlag) -> Option<Ordering>
1.0.0 · source§fn le(&self, other: &Rhs) -> bool
fn le(&self, other: &Rhs) -> bool
self
and other
) and is used by the <=
operator. Read more