diff --git a/quickwit/Cargo.lock b/quickwit/Cargo.lock index a8d34e1406a..146dbee4707 100644 --- a/quickwit/Cargo.lock +++ b/quickwit/Cargo.lock @@ -4733,7 +4733,7 @@ checksum = "b15813163c1d831bf4a13c3610c05c0d03b39feb07f7e09fa234dac9b15aaf39" [[package]] name = "ownedbytes" version = "0.7.0" -source = "git+https://github.com/quickwit-oss/tantivy/?rev=c71ec80#c71ec8086d6563c4bb7e573182a26b280a3ac519" +source = "git+https://github.com/quickwit-oss/tantivy/?rev=9f81d59#9f81d59ecd283a4ce1b6527a447c705b5fba0b1a" dependencies = [ "stable_deref_trait", ] @@ -8159,7 +8159,7 @@ dependencies = [ [[package]] name = "tantivy" version = "0.23.0" -source = "git+https://github.com/quickwit-oss/tantivy/?rev=c71ec80#c71ec8086d6563c4bb7e573182a26b280a3ac519" +source = "git+https://github.com/quickwit-oss/tantivy/?rev=9f81d59#9f81d59ecd283a4ce1b6527a447c705b5fba0b1a" dependencies = [ "aho-corasick", "arc-swap", @@ -8212,7 +8212,7 @@ dependencies = [ [[package]] name = "tantivy-bitpacker" version = "0.6.0" -source = "git+https://github.com/quickwit-oss/tantivy/?rev=c71ec80#c71ec8086d6563c4bb7e573182a26b280a3ac519" +source = "git+https://github.com/quickwit-oss/tantivy/?rev=9f81d59#9f81d59ecd283a4ce1b6527a447c705b5fba0b1a" dependencies = [ "bitpacking", ] @@ -8220,7 +8220,7 @@ dependencies = [ [[package]] name = "tantivy-columnar" version = "0.3.0" -source = "git+https://github.com/quickwit-oss/tantivy/?rev=c71ec80#c71ec8086d6563c4bb7e573182a26b280a3ac519" +source = "git+https://github.com/quickwit-oss/tantivy/?rev=9f81d59#9f81d59ecd283a4ce1b6527a447c705b5fba0b1a" dependencies = [ "downcast-rs", "fastdivide", @@ -8235,7 +8235,7 @@ dependencies = [ [[package]] name = "tantivy-common" version = "0.7.0" -source = "git+https://github.com/quickwit-oss/tantivy/?rev=c71ec80#c71ec8086d6563c4bb7e573182a26b280a3ac519" +source = "git+https://github.com/quickwit-oss/tantivy/?rev=9f81d59#9f81d59ecd283a4ce1b6527a447c705b5fba0b1a" dependencies = [ "async-trait", "byteorder", @@ -8258,7 +8258,7 @@ dependencies = [ [[package]] name = "tantivy-query-grammar" version = "0.22.0" -source = "git+https://github.com/quickwit-oss/tantivy/?rev=c71ec80#c71ec8086d6563c4bb7e573182a26b280a3ac519" +source = "git+https://github.com/quickwit-oss/tantivy/?rev=9f81d59#9f81d59ecd283a4ce1b6527a447c705b5fba0b1a" dependencies = [ "nom", ] @@ -8266,7 +8266,7 @@ dependencies = [ [[package]] name = "tantivy-sstable" version = "0.3.0" -source = "git+https://github.com/quickwit-oss/tantivy/?rev=c71ec80#c71ec8086d6563c4bb7e573182a26b280a3ac519" +source = "git+https://github.com/quickwit-oss/tantivy/?rev=9f81d59#9f81d59ecd283a4ce1b6527a447c705b5fba0b1a" dependencies = [ "tantivy-bitpacker", "tantivy-common", @@ -8277,7 +8277,7 @@ dependencies = [ [[package]] name = "tantivy-stacker" version = "0.3.0" -source = "git+https://github.com/quickwit-oss/tantivy/?rev=c71ec80#c71ec8086d6563c4bb7e573182a26b280a3ac519" +source = "git+https://github.com/quickwit-oss/tantivy/?rev=9f81d59#9f81d59ecd283a4ce1b6527a447c705b5fba0b1a" dependencies = [ "murmurhash32", "rand_distr", @@ -8287,7 +8287,7 @@ dependencies = [ [[package]] name = "tantivy-tokenizer-api" version = "0.3.0" -source = "git+https://github.com/quickwit-oss/tantivy/?rev=c71ec80#c71ec8086d6563c4bb7e573182a26b280a3ac519" +source = "git+https://github.com/quickwit-oss/tantivy/?rev=9f81d59#9f81d59ecd283a4ce1b6527a447c705b5fba0b1a" dependencies = [ "serde", ] diff --git a/quickwit/Cargo.toml b/quickwit/Cargo.toml index 51b3df6d541..1a6bd977802 100644 --- a/quickwit/Cargo.toml +++ b/quickwit/Cargo.toml @@ -325,7 +325,7 @@ quickwit-serve = { path = "quickwit-serve" } quickwit-storage = { path = "quickwit-storage" } quickwit-telemetry = { path = "quickwit-telemetry" } -tantivy = { git = "https://github.com/quickwit-oss/tantivy/", rev = "c71ec80", default-features = false, features = [ +tantivy = { git = "https://github.com/quickwit-oss/tantivy/", rev = "9f81d59", default-features = false, features = [ "lz4-compression", "mmap", "quickwit", diff --git a/quickwit/quickwit-doc-mapper/src/default_doc_mapper/default_mapper.rs b/quickwit/quickwit-doc-mapper/src/default_doc_mapper/default_mapper.rs index f94cb39340d..512a35e1ab7 100644 --- a/quickwit/quickwit-doc-mapper/src/default_doc_mapper/default_mapper.rs +++ b/quickwit/quickwit-doc-mapper/src/default_doc_mapper/default_mapper.rs @@ -1735,6 +1735,28 @@ mod tests { .contains("concatenate type must have at least one sub-field")); } + #[test] + fn test_concatenate_field_in_default_field() { + serde_json::from_str::( + r#"{ + "default_search_fields": ["concat"], + "field_mappings": [ + { + "name": "some_text", + "type": "text" + }, + { + "name": "concat", + "type": "concatenate", + "concatenate_fields": ["some_text"] + } + ], + "mode": "strict" + }"#, + ) + .unwrap(); + } + #[test] fn test_concatenate_field_in_mapping() { test_doc_from_json_test_aux( diff --git a/quickwit/rest-api-tests/scenarii/default_search_fields/0002_invalid_default_fields.yaml b/quickwit/rest-api-tests/scenarii/default_search_fields/0002_invalid_default_fields.yaml index ba66f5db6c5..67ec2ba2620 100644 --- a/quickwit/rest-api-tests/scenarii/default_search_fields/0002_invalid_default_fields.yaml +++ b/quickwit/rest-api-tests/scenarii/default_search_fields/0002_invalid_default_fields.yaml @@ -16,8 +16,8 @@ expected: message: $expect: "\"unknown default search field `regular_field`\" in val" --- -# should fail because default search field targets the root -# of a json field. +# should fail because default search field targets a sub field of a +# non-json field method: POST endpoint: indexes/ json: @@ -26,15 +26,15 @@ json: doc_mapping: mode: dynamic field_mappings: - - name: inner_json - type: json + - name: text + type: text search_settings: default_search_fields: - - inner_json + - text.inner status_code: 400 expected: message: - $expect: "\"unknown default search field `inner_json`\" in val" + $expect: "\"unknown default search field `text.inner`\" in val" --- # should fail because dynamic field is not indexed. method: POST