Skip to content

Commit d8e0fbc

Browse files
PSeitz-ddPSeitz
andauthored
update tantivy (#5892)
* update tantivy * include columnar compression, fix build * fix build --------- Co-authored-by: PSeitz <PSeitz@users.noreply.github.com>
1 parent 96faed6 commit d8e0fbc

File tree

5 files changed

+42
-32
lines changed

5 files changed

+42
-32
lines changed

quickwit/Cargo.lock

Lines changed: 24 additions & 22 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

quickwit/Cargo.toml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -346,11 +346,12 @@ quickwit-serve = { path = "quickwit-serve" }
346346
quickwit-storage = { path = "quickwit-storage" }
347347
quickwit-telemetry = { path = "quickwit-telemetry" }
348348

349-
tantivy = { git = "https://github.com/quickwit-oss/tantivy/", rev = "80f5f1e", default-features = false, features = [
349+
tantivy = { git = "https://github.com/quickwit-oss/tantivy/", rev = "7963b0b", default-features = false, features = [
350350
"lz4-compression",
351351
"mmap",
352352
"quickwit",
353353
"zstd-compression",
354+
"columnar-zstd-compression",
354355
] }
355356
tantivy-fst = "0.5"
356357

quickwit/quickwit-indexing/src/actors/packager.rs

Lines changed: 14 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -360,8 +360,8 @@ fn field_metadata_to_list_field_serialized(
360360
ListFieldsEntryResponse {
361361
field_name: field_metadata.field_name.to_string(),
362362
field_type: tantivy_type_to_list_field_type(field_metadata.typ) as i32,
363-
searchable: field_metadata.indexed,
364-
aggregatable: field_metadata.fast,
363+
searchable: field_metadata.is_indexed(),
364+
aggregatable: field_metadata.is_fast(),
365365
index_ids: Vec::new(),
366366
non_searchable_index_ids: Vec::new(),
367367
non_aggregatable_index_ids: Vec::new(),
@@ -398,23 +398,29 @@ mod tests {
398398
FieldMetadata {
399399
field_name: "test".to_string(),
400400
typ: Type::Str,
401-
indexed: true,
402401
stored: true,
403-
fast: true,
402+
fast_size: Some(10u64.into()),
403+
term_dictionary_size: Some(10u64.into()),
404+
postings_size: Some(10u64.into()),
405+
positions_size: Some(10u64.into()),
404406
},
405407
FieldMetadata {
406408
field_name: "test2".to_string(),
407409
typ: Type::Str,
408-
indexed: true,
409410
stored: false,
410-
fast: false,
411+
fast_size: None,
412+
term_dictionary_size: Some(10u64.into()),
413+
postings_size: Some(10u64.into()),
414+
positions_size: Some(10u64.into()),
411415
},
412416
FieldMetadata {
413417
field_name: "test3".to_string(),
414418
typ: Type::U64,
415-
indexed: true,
416419
stored: false,
417-
fast: true,
420+
fast_size: Some(10u64.into()),
421+
term_dictionary_size: Some(10u64.into()),
422+
postings_size: Some(10u64.into()),
423+
positions_size: Some(10u64.into()),
418424
},
419425
];
420426

quickwit/quickwit-query/src/query_ast/user_input_query.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -178,6 +178,7 @@ fn convert_user_input_ast_to_query_ast(
178178
Ok(term_set_query.into())
179179
}
180180
UserInputLeaf::Exists { field } => Ok(FieldPresenceQuery { field }.into()),
181+
UserInputLeaf::Regex { .. } => bail!("regex query is not supported"),
181182
},
182183
UserInputAst::Boost(underlying, boost) => {
183184
let query_ast = convert_user_input_ast_to_query_ast(

quickwit/quickwit-query/src/query_ast/utils.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -195,7 +195,7 @@ fn compute_tantivy_ast_query_for_json(
195195
) -> Result<TantivyQueryAst, InvalidQuery> {
196196
let mut bool_query = TantivyBoolQuery::default();
197197
let term = Term::from_field_json_path(field, json_path, json_options.is_expand_dots_enabled());
198-
if let Some(term) = convert_to_fast_value_and_append_to_json_term(term, text, true) {
198+
if let Some(term) = convert_to_fast_value_and_append_to_json_term(&term, text, true) {
199199
bool_query
200200
.should
201201
.push(TantivyTermQuery::new(term, IndexRecordOption::Basic).into());

0 commit comments

Comments
 (0)