From caf52766be37a35f7dbbc434c4f88eea666aea57 Mon Sep 17 00:00:00 2001 From: Sidhant29 Date: Tue, 17 Jan 2023 10:48:18 +1000 Subject: [PATCH] Added add_float() function for Document --- src/document.rs | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/src/document.rs b/src/document.rs index acb79f5..c080a82 100644 --- a/src/document.rs +++ b/src/document.rs @@ -292,6 +292,15 @@ impl Document { add_value(self, field_name, value); } + /// Add a float value to the document. + /// + /// Args: + /// field_name (str): The field name for which we are adding the integer. + /// value (f64): The float that will be added to the document. + fn add_float(&mut self, field_name: String, value: f64) { + add_value(self, field_name, value); + } + /// Add a date value to the document. /// /// Args: