Skip to main content

diskann_label_filter/
lib.rs

1/*
2 * Copyright (c) Microsoft Corporation.
3 * Licensed under the MIT license.
4 */
5
6// Parser modules
7pub mod parser {
8    pub mod ast;
9    pub mod evaluator;
10    pub mod format;
11    pub mod query_parser;
12}
13
14// Utils
15pub mod utils {
16    pub mod flatten_utils;
17    pub mod jsonl_reader;
18}
19
20pub mod inline_beta_search {
21    pub mod encoded_document_accessor;
22    pub mod inline_beta_filter;
23    pub mod predicate_evaluator;
24}
25
26// Persisent Index Traits
27pub mod traits {
28    pub mod attribute_accessor;
29    pub mod attribute_store;
30    pub mod inverted_index_trait;
31    pub mod key_codec;
32    pub mod kv_store_traits;
33    pub mod posting_list_trait;
34    pub mod query_evaluator;
35}
36
37//Modules that  handle predicates by mapping them
38// to integers.
39pub mod encoded_attribute_provider {
40    pub(crate) mod ast_id_expr;
41    pub(crate) mod ast_label_id_mapper;
42    pub(crate) mod attribute_encoder;
43    pub mod document_provider;
44    pub mod encoded_attribute_accessor;
45    pub(crate) mod encoded_filter_expr;
46    pub mod roaring_attribute_store;
47}
48
49pub mod tests {
50    #[cfg(test)]
51    pub mod attribute_accessor_test;
52    #[cfg(test)]
53    pub mod common;
54    #[cfg(test)]
55    pub mod roaring_attribute_store_test;
56}
57
58pub mod attribute;
59pub mod document;
60pub mod query;
61pub mod set;
62
63// Index implementations
64pub mod kv_index;
65
66// Storage backends
67pub mod stores;
68
69// Re-exports for convenience
70pub use parser::ast::{ASTExpr, CompareOp};
71pub use parser::evaluator::eval_query_expr;
72pub use parser::query_parser::{get_value_by_path, parse_query_filter};
73pub use traits::inverted_index_trait::InvertedIndexProvider;
74pub use traits::key_codec::DefaultKeyCodec;
75pub use traits::kv_store_traits::KvStore;
76pub use utils::flatten_utils::Attributes;
77pub use utils::jsonl_reader::{
78    read_and_parse_queries, read_baselabels, read_ground_truth, read_queries, JsonlReadError,
79};