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

add support for f64 for concat fields #5369

Merged
merged 3 commits into from
Aug 30, 2024
Merged

add support for f64 for concat fields #5369

merged 3 commits into from
Aug 30, 2024

Conversation

PSeitz
Copy link
Contributor

@PSeitz PSeitz commented Aug 30, 2024

No description provided.

@PSeitz PSeitz requested a review from trinity-1686a August 30, 2024 08:09
@PSeitz PSeitz force-pushed the concat_json_field branch from 5542707 to 213ecbf Compare August 30, 2024 08:31
Copy link

github-actions bot commented Aug 30, 2024

On SSD:

Average search latency is 0.994x that of the reference (lower is better).
Ref run id: 3127, ref commit: c00dd57
Link

On GCS:

Average search latency is 0.984x that of the reference (lower is better).
Ref run id: 3128, ref commit: c00dd57
Link

@PSeitz PSeitz force-pushed the concat_json_field branch from 213ecbf to 8454c98 Compare August 30, 2024 09:18
Copy link
Contributor

@trinity-1686a trinity-1686a left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

you will also need something like

diff --git a/quickwit/quickwit-doc-mapper/src/default_doc_mapper/mapping_tree.rs b/quickwit/quickwit-doc-mapper/src/default_doc_mapper/mapping_tree.rs
index ec2faa76a..b93a08b2c 100644
--- a/quickwit/quickwit-doc-mapper/src/default_doc_mapper/mapping_tree.rs
+++ b/quickwit/quickwit-doc-mapper/src/default_doc_mapper/mapping_tree.rs
@@ -282,7 +282,10 @@ impl LeafType {
                 let val = u64::from_json_to_self(&json_val, numeric_options.coerce)?;
                 Ok(OneOrIter::one((val).into()))
             }
-            LeafType::F64(_) => Err("unsupported concat type: f64".to_string()),
+            LeafType::F64(numeric_options) => {
+                let val = f64::from_json_to_self(&json_val, numeric_options.coerce)?;
+                Ok(OneOrIter::one((val).into()))
+            },
             LeafType::Bool(_) => {
                 if let JsonValue::Bool(val) = json_val {
                     Ok(OneOrIter::one((val).into()))

otherwise the index can be created, but the values are not mapped

@PSeitz PSeitz merged commit 489c9d6 into main Aug 30, 2024
5 checks passed
@PSeitz PSeitz deleted the concat_json_field branch August 30, 2024 12:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants