Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

refactor(storage): inverted index support calculate the score #16609

Merged
merged 4 commits into from
Oct 18, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

15 changes: 8 additions & 7 deletions src/query/ee/tests/it/inverted_index/index_refresh.rs
Original file line number Diff line number Diff line change
Expand Up @@ -154,8 +154,6 @@ async fn test_fuse_do_refresh_inverted_index() -> Result<()> {
field_ids.insert(1);
let index_record = IndexRecordOption::WithFreqsAndPositions;

let index_reader = InvertedIndexReader::create(dal.clone());

let queries = vec![
("rust".to_string(), vec![0, 1]),
("java".to_string(), vec![2]),
Expand All @@ -177,18 +175,21 @@ async fn test_fuse_do_refresh_inverted_index() -> Result<()> {
let (query, fuzziness, tokenizer_manager) =
create_inverted_index_query(&inverted_index_info)?;

let index_reader = InvertedIndexReader::create(
dal.clone(),
need_position,
has_score,
tokenizer_manager,
block_meta.row_count,
);

let matched_rows = index_reader
.clone()
.do_filter(
&settings,
need_position,
has_score,
query.box_clone(),
&field_ids,
&index_record,
&fuzziness,
tokenizer_manager,
block_meta.row_count,
&index_loc,
)
.await?;
Expand Down
12 changes: 6 additions & 6 deletions src/query/ee/tests/it/inverted_index/pruning.rs
Original file line number Diff line number Diff line change
Expand Up @@ -707,7 +707,7 @@ async fn test_block_pruner() -> Result<()> {
}),
..Default::default()
};
let _e13 = PushDownInfo {
let e13 = PushDownInfo {
inverted_index: Some(InvertedIndexInfo {
index_name: index_name.clone(),
index_version: index_version.clone(),
Expand All @@ -720,7 +720,7 @@ async fn test_block_pruner() -> Result<()> {
}),
..Default::default()
};
let _e14 = PushDownInfo {
let e14 = PushDownInfo {
inverted_index: Some(InvertedIndexInfo {
index_name: index_name.clone(),
index_version: index_version.clone(),
Expand All @@ -733,7 +733,7 @@ async fn test_block_pruner() -> Result<()> {
}),
..Default::default()
};
let _e15 = PushDownInfo {
let e15 = PushDownInfo {
inverted_index: Some(InvertedIndexInfo {
index_name: index_name.clone(),
index_version: index_version.clone(),
Expand All @@ -759,9 +759,9 @@ async fn test_block_pruner() -> Result<()> {
(Some(e10), 2, 2),
(Some(e11), 9, 15),
(Some(e12), 2, 2),
//(Some(e13), 3, 3),
//(Some(e14), 2, 2),
//(Some(e15), 2, 5),
(Some(e13), 3, 3),
(Some(e14), 2, 2),
(Some(e15), 2, 5),
];

for (extra, expected_blocks, expected_rows) in extras {
Expand Down
Loading
Loading