@@ -3,8 +3,8 @@ use crate::qdrant::points_selector::PointsSelectorOneOf;
33use crate :: qdrant:: r#match:: MatchValue ;
44use crate :: qdrant:: {
55 self , Condition , DatetimeRange , FieldCondition , Filter , GeoBoundingBox , GeoPolygon , GeoRadius ,
6- HasIdCondition , IsEmptyCondition , IsNullCondition , MinShould , NestedCondition , PointId ,
7- PointsSelector , Range , ValuesCount ,
6+ HasIdCondition , HasVectorCondition , IsEmptyCondition , IsNullCondition , MinShould ,
7+ NestedCondition , PointId , PointsSelector , Range , ValuesCount ,
88} ;
99
1010impl From < Filter > for PointsSelector {
@@ -47,6 +47,14 @@ impl From<HasIdCondition> for Condition {
4747 }
4848}
4949
50+ impl From < HasVectorCondition > for Condition {
51+ fn from ( has_vector_condition : HasVectorCondition ) -> Self {
52+ Condition {
53+ condition_one_of : Some ( ConditionOneOf :: HasVector ( has_vector_condition) ) ,
54+ }
55+ }
56+ }
57+
5058impl From < Filter > for Condition {
5159 fn from ( filter : Filter ) -> Self {
5260 Condition {
@@ -180,6 +188,18 @@ impl qdrant::Condition {
180188 } )
181189 }
182190
191+ /// Create a [`Condition`] to check if the point has a specific named vector.
192+ ///
193+ /// # Examples:
194+ /// ```
195+ /// qdrant_client::qdrant::Condition::has_vector("my_vector");
196+ /// ```
197+ pub fn has_vector ( vector_name : impl Into < String > ) -> Self {
198+ Self :: from ( qdrant:: HasVectorCondition {
199+ has_vector : vector_name. into ( ) ,
200+ } )
201+ }
202+
183203 /// Create a [`Condition`] that matches a field against a certain value.
184204 ///
185205 /// # Examples:
0 commit comments