pub struct Condition {
pub condition_one_of: Option<ConditionOneOf>,
}Fields§
§condition_one_of: Option<ConditionOneOf>Implementations§
Source§impl Condition
impl Condition
Sourcepub fn has_id(ids: impl IntoIterator<Item = impl Into<PointId>>) -> Self
pub fn has_id(ids: impl IntoIterator<Item = impl Into<PointId>>) -> Self
Sourcepub fn has_vector(vector_name: impl Into<String>) -> Self
pub fn has_vector(vector_name: impl Into<String>) -> Self
Sourcepub fn matches_prefix(
field: impl Into<String>,
prefix: impl Into<String>,
) -> Self
pub fn matches_prefix( field: impl Into<String>, prefix: impl Into<String>, ) -> Self
Create a Condition to match keywords starting with the given prefix.
Requires the keyword index of the field to be created with prefix matching enabled,
see KeywordIndexParamsBuilder::prefix.
§Examples:
qdrant_client::qdrant::Condition::matches_prefix("city", "Ber");Sourcepub fn slice(total: u32, index: u32) -> Self
pub fn slice(total: u32, index: u32) -> Self
Create a Condition selecting one of total disjoint deterministic slices of the id
space. Useful to split a collection into equally sized chunks, for example to scroll
through it in parallel.
index must be less than total.
§Examples:
// Select the first of four slices of the collection
qdrant_client::qdrant::Condition::slice(4, 0);Sourcepub fn datetime_range(field: impl Into<String>, range: DatetimeRange) -> Self
pub fn datetime_range(field: impl Into<String>, range: DatetimeRange) -> Self
Sourcepub fn geo_radius(field: impl Into<String>, geo_radius: GeoRadius) -> Self
pub fn geo_radius(field: impl Into<String>, geo_radius: GeoRadius) -> Self
Sourcepub fn geo_bounding_box(
field: impl Into<String>,
geo_bounding_box: GeoBoundingBox,
) -> Self
pub fn geo_bounding_box( field: impl Into<String>, geo_bounding_box: GeoBoundingBox, ) -> Self
Create a Condition that checks geo fields against a bounding box.
§Examples:
use qdrant_client::qdrant::{GeoPoint, GeoBoundingBox};
qdrant_client::qdrant::Condition::geo_bounding_box("location", GeoBoundingBox {
top_left: Some(GeoPoint { lon: 42., lat: 42. }),
bottom_right: Some(GeoPoint { lon: 42., lat: 42. }),
});Sourcepub fn geo_polygon(field: impl Into<String>, geo_polygon: GeoPolygon) -> Self
pub fn geo_polygon(field: impl Into<String>, geo_polygon: GeoPolygon) -> Self
Create a Condition that checks geo fields against a geo polygons.
§Examples:
use qdrant_client::qdrant::{GeoLineString, GeoPoint, GeoPolygon};
let polygon = GeoPolygon {
exterior: Some(GeoLineString { points: vec![GeoPoint { lon: 42., lat: 42. }]}),
interiors: vec![],
};
qdrant_client::qdrant::Condition::geo_polygon("location", polygon);Sourcepub fn values_count(field: impl Into<String>, values_count: ValuesCount) -> Self
pub fn values_count(field: impl Into<String>, values_count: ValuesCount) -> Self
Sourcepub fn nested(field: impl Into<String>, filter: Filter) -> Self
pub fn nested(field: impl Into<String>, filter: Filter) -> Self
Create a Condition that applies a per-element filter to a nested array
The field parameter should be a key-path to a nested array of objects.
You may specify it as both array_field or array_field[].
For motivation and further examples, see API documentation.
§Panics:
If debug assertions are enabled, this will panic if the filter, or any its subfilters,
contain a HasIdCondition (equivalently, a condition created with Self::has_id),
as these are unsupported for nested object filters.
§Examples:
use qdrant_client::qdrant::Filter;
qdrant_client::qdrant::Condition::nested("array_field[]", Filter::any([
qdrant_client::qdrant::Condition::is_null("element_field")
]));Trait Implementations§
Source§impl From<Condition> for Expression
impl From<Condition> for Expression
Source§impl From<ConditionOneOf> for Condition
impl From<ConditionOneOf> for Condition
Source§fn from(value: ConditionOneOf) -> Self
fn from(value: ConditionOneOf) -> Self
Source§impl From<FieldCondition> for Condition
impl From<FieldCondition> for Condition
Source§fn from(field_condition: FieldCondition) -> Self
fn from(field_condition: FieldCondition) -> Self
Source§impl From<HasIdCondition> for Condition
impl From<HasIdCondition> for Condition
Source§fn from(has_id_condition: HasIdCondition) -> Self
fn from(has_id_condition: HasIdCondition) -> Self
Source§impl From<HasVectorCondition> for Condition
impl From<HasVectorCondition> for Condition
Source§fn from(has_vector_condition: HasVectorCondition) -> Self
fn from(has_vector_condition: HasVectorCondition) -> Self
Source§impl From<IsEmptyCondition> for Condition
impl From<IsEmptyCondition> for Condition
Source§fn from(is_empty_condition: IsEmptyCondition) -> Self
fn from(is_empty_condition: IsEmptyCondition) -> Self
Source§impl From<IsNullCondition> for Condition
impl From<IsNullCondition> for Condition
Source§fn from(is_null_condition: IsNullCondition) -> Self
fn from(is_null_condition: IsNullCondition) -> Self
Source§impl From<NestedCondition> for Condition
impl From<NestedCondition> for Condition
Source§fn from(nested_condition: NestedCondition) -> Self
fn from(nested_condition: NestedCondition) -> Self
Source§impl From<SliceCondition> for Condition
impl From<SliceCondition> for Condition
Source§fn from(slice_condition: SliceCondition) -> Self
fn from(slice_condition: SliceCondition) -> Self
Source§impl Message for Condition
impl Message for Condition
Source§fn encoded_len(&self) -> usize
fn encoded_len(&self) -> usize
Source§fn encode(&self, buf: &mut impl BufMut) -> Result<(), EncodeError>where
Self: Sized,
fn encode(&self, buf: &mut impl BufMut) -> Result<(), EncodeError>where
Self: Sized,
Source§fn encode_to_vec(&self) -> Vec<u8> ⓘwhere
Self: Sized,
fn encode_to_vec(&self) -> Vec<u8> ⓘwhere
Self: Sized,
Source§fn encode_length_delimited(
&self,
buf: &mut impl BufMut,
) -> Result<(), EncodeError>where
Self: Sized,
fn encode_length_delimited(
&self,
buf: &mut impl BufMut,
) -> Result<(), EncodeError>where
Self: Sized,
Source§fn encode_length_delimited_to_vec(&self) -> Vec<u8> ⓘwhere
Self: Sized,
fn encode_length_delimited_to_vec(&self) -> Vec<u8> ⓘwhere
Self: Sized,
Source§fn decode(buf: impl Buf) -> Result<Self, DecodeError>where
Self: Default,
fn decode(buf: impl Buf) -> Result<Self, DecodeError>where
Self: Default,
Source§fn decode_length_delimited(buf: impl Buf) -> Result<Self, DecodeError>where
Self: Default,
fn decode_length_delimited(buf: impl Buf) -> Result<Self, DecodeError>where
Self: Default,
Source§fn merge(&mut self, buf: impl Buf) -> Result<(), DecodeError>where
Self: Sized,
fn merge(&mut self, buf: impl Buf) -> Result<(), DecodeError>where
Self: Sized,
self. Read moreSource§fn merge_length_delimited(&mut self, buf: impl Buf) -> Result<(), DecodeError>where
Self: Sized,
fn merge_length_delimited(&mut self, buf: impl Buf) -> Result<(), DecodeError>where
Self: Sized,
self.impl StructuralPartialEq for Condition
Auto Trait Implementations§
impl Freeze for Condition
impl RefUnwindSafe for Condition
impl Send for Condition
impl Sync for Condition
impl Unpin for Condition
impl UnsafeUnpin for Condition
impl UnwindSafe for Condition
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
Source§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
T in a tonic::Request