mirror of
https://github.com/qdrant/qdrant.git
synced 2026-08-07 02:20:55 -05:00
Include binary index on match value (#2744)
This commit is contained in:
@@ -199,6 +199,16 @@ impl BinaryIndex {
|
||||
pub fn values_is_empty(&self, point_id: PointOffsetType) -> bool {
|
||||
self.values_count(point_id) == 0
|
||||
}
|
||||
|
||||
/// Check if the point has a true value
|
||||
pub fn values_has_true(&self, point_id: PointOffsetType) -> bool {
|
||||
self.memory.get(point_id).has_true()
|
||||
}
|
||||
|
||||
/// Check if the point has a false value
|
||||
pub fn values_has_false(&self, point_id: PointOffsetType) -> bool {
|
||||
self.memory.get(point_id).has_false()
|
||||
}
|
||||
}
|
||||
|
||||
impl PayloadFieldIndex for BinaryIndex {
|
||||
|
||||
@@ -234,6 +234,15 @@ pub fn get_match_checkers(index: &FieldIndex, cond_match: Match) -> Option<Condi
|
||||
.map_or(false, |values| values.iter().any(|i| i == &value))
|
||||
}))
|
||||
}
|
||||
(ValueVariants::Bool(is_true), FieldIndex::BinaryIndex(index)) => {
|
||||
Some(Box::new(move |point_id: PointOffsetType| {
|
||||
if is_true {
|
||||
index.values_has_true(point_id)
|
||||
} else {
|
||||
index.values_has_false(point_id)
|
||||
}
|
||||
}))
|
||||
}
|
||||
_ => None,
|
||||
},
|
||||
Match::Text(MatchText { text }) => match index {
|
||||
|
||||
Reference in New Issue
Block a user