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
sourceimpl Clone for RegexpFlag
impl Clone for RegexpFlag
sourcefn clone(&self) -> RegexpFlag
fn clone(&self) -> RegexpFlag
Returns a copy of the value. Read more
1.0.0 · sourcefn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source
. Read more
sourceimpl Debug for RegexpFlag
impl Debug for RegexpFlag
sourceimpl Display for RegexpFlag
impl Display for RegexpFlag
sourceimpl From<RegexpFlag> for &'static str
impl From<RegexpFlag> for &'static str
sourcefn from(value: RegexpFlag) -> Self
fn from(value: RegexpFlag) -> Self
Converts to this type from the input type.
sourceimpl From<RegexpFlag> for String
impl From<RegexpFlag> for String
sourcefn from(value: RegexpFlag) -> Self
fn from(value: RegexpFlag) -> Self
Converts to this type from the input type.
sourceimpl Ord for RegexpFlag
impl Ord for RegexpFlag
sourceimpl PartialEq<RegexpFlag> for RegexpFlag
impl PartialEq<RegexpFlag> for RegexpFlag
sourceimpl PartialOrd<RegexpFlag> for RegexpFlag
impl PartialOrd<RegexpFlag> for RegexpFlag
sourcefn partial_cmp(&self, other: &RegexpFlag) -> Option<Ordering>
fn partial_cmp(&self, other: &RegexpFlag) -> Option<Ordering>
This method returns an ordering between self
and other
values if one exists. Read more
1.0.0 · sourcefn lt(&self, other: &Rhs) -> bool
fn lt(&self, other: &Rhs) -> bool
This method tests less than (for self
and other
) and is used by the <
operator. Read more
1.0.0 · sourcefn le(&self, other: &Rhs) -> bool
fn le(&self, other: &Rhs) -> bool
This method tests less than or equal to (for self
and other
) and is used by the <=
operator. Read more
sourceimpl Serialize for RegexpFlag
impl Serialize for RegexpFlag
impl Copy for RegexpFlag
impl Eq for RegexpFlag
impl StructuralEq for RegexpFlag
impl StructuralPartialEq for RegexpFlag
Auto Trait Implementations
impl RefUnwindSafe for RegexpFlag
impl Send for RegexpFlag
impl Sync for RegexpFlag
impl Unpin for RegexpFlag
impl UnwindSafe for RegexpFlag
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more