Skip to content

Commit

Permalink
add support for exist in query language (#3800)
Browse files Browse the repository at this point in the history
* add support for exist in query language

* upgrade tantivy
  • Loading branch information
trinity-1686a authored Sep 20, 2023
1 parent 31fd56b commit 46a4dc4
Show file tree
Hide file tree
Showing 5 changed files with 16 additions and 13 deletions.
18 changes: 9 additions & 9 deletions quickwit/Cargo.lock

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

2 changes: 1 addition & 1 deletion quickwit/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -231,7 +231,7 @@ quickwit-serve = { version = "0.6.3", path = "./quickwit-serve" }
quickwit-storage = { version = "0.6.3", path = "./quickwit-storage" }
quickwit-telemetry = { version = "0.6.3", path = "./quickwit-telemetry" }

tantivy = { git = "https://github.com/quickwit-oss/tantivy/", rev = "1932513", default-features = false, features = [
tantivy = { git = "https://github.com/quickwit-oss/tantivy/", rev = "0241a05b", default-features = false, features = [
"mmap",
"lz4-compression",
"zstd-compression",
Expand Down
2 changes: 1 addition & 1 deletion quickwit/quickwit-indexing/src/actors/merge_executor.rs
Original file line number Diff line number Diff line change
Expand Up @@ -466,7 +466,7 @@ impl MergeExecutor {
ctx.record_progress();
let _protect_guard = ctx.protect_zone();

let mut index_writer = union_index.writer_with_num_threads(1, 3_000_000)?;
let mut index_writer = union_index.writer_with_num_threads(1, 15_000_000)?;
let num_delete_tasks = delete_tasks.len();
if num_delete_tasks > 0 {
let doc_mapper = doc_mapper_opt
Expand Down
2 changes: 1 addition & 1 deletion quickwit/quickwit-indexing/src/models/indexed_split.rs
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ impl IndexedSplitBuilder {
let controlled_directory = ControlledDirectory::new(box_mmap_directory, io_controls);

let index_writer =
index_builder.single_segment_index_writer(controlled_directory.clone(), 10_000_000)?;
index_builder.single_segment_index_writer(controlled_directory.clone(), 15_000_000)?;
Ok(Self {
split_attrs: SplitAttrs {
pipeline_id,
Expand Down
5 changes: 4 additions & 1 deletion quickwit/quickwit-query/src/query_ast/user_input_query.rs
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,9 @@ use tantivy::tokenizer::TokenizerManager;

use crate::not_nan_f32::NotNaNf32;
use crate::query_ast::tantivy_query_ast::TantivyQueryAst;
use crate::query_ast::{self, BuildTantivyAst, FullTextMode, FullTextParams, QueryAst};
use crate::query_ast::{
self, BuildTantivyAst, FieldPresenceQuery, FullTextMode, FullTextParams, QueryAst,
};
use crate::{BooleanOperand, InvalidQuery, JsonLiteral};

const DEFAULT_PHRASE_QUERY_MAX_EXPANSION: u32 = 50;
Expand Down Expand Up @@ -161,6 +163,7 @@ fn convert_user_input_ast_to_query_ast(
let term_set_query = query_ast::TermSetQuery { terms_per_field };
Ok(term_set_query.into())
}
UserInputLeaf::Exists { field } => Ok(FieldPresenceQuery { field }.into()),
},
UserInputAst::Boost(underlying, boost) => {
let query_ast = convert_user_input_ast_to_query_ast(
Expand Down

0 comments on commit 46a4dc4

Please sign in to comment.