-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
refactored index, skeleton query processor
- Loading branch information
Showing
4 changed files
with
68 additions
and
12 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -21,4 +21,5 @@ Cargo.lock | |
# Data files | ||
/data/wiki-data | ||
/data/index_unit_test/index | ||
/data/test | ||
/data/test | ||
/data/small |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,3 @@ | ||
pub mod disk; | ||
pub mod index; | ||
pub mod query; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
use crate::index::Index; | ||
|
||
struct QueryProcessor { | ||
index: Index, | ||
} | ||
|
||
impl QueryProcessor { | ||
pub fn build_query_processor( | ||
index_input_path: &str, | ||
index_tokenizer_path: &str, | ||
) -> QueryProcessor { | ||
QueryProcessor { | ||
index: Index::load_index(index_input_path, index_tokenizer_path), | ||
} | ||
} | ||
|
||
pub fn query(query: &str) -> Vec<u32> { | ||
todo!() | ||
} | ||
} |