|
|
@@ -154,10 +154,13 @@ impl Query for KeyValueQuery {
|
|
154
|
154
|
return false;
|
|
155
|
155
|
}
|
|
156
|
156
|
|
|
157
|
|
- fn dense_node_matches(&self, _bi: &Self::BI, dnode: &DenseNode) -> bool {
|
|
158
|
|
- //TODO use raw tags
|
|
159
|
|
- for (key, val) in dnode.tags() {
|
|
160
|
|
- if key == self.key && val == self.value {
|
|
|
157
|
+ fn dense_node_matches(&self, bi: &Self::BI, dnode: &DenseNode) -> bool {
|
|
|
158
|
+ for (key, val) in dnode.raw_tags() {
|
|
|
159
|
+ if key >= 0 &&
|
|
|
160
|
+ val >= 0 &&
|
|
|
161
|
+ bi.0.binary_search(&(key as u32)).is_ok() &&
|
|
|
162
|
+ bi.1.binary_search(&(val as u32)).is_ok()
|
|
|
163
|
+ {
|
|
161
|
164
|
return true;
|
|
162
|
165
|
}
|
|
163
|
166
|
}
|