diff options
author | fdb-hiroshima <35889323+fdb-hiroshima@users.noreply.github.com> | 2019-07-27 10:57:33 +0200 |
---|---|---|
committer | Paul Masurel <paul.masurel@gmail.com> | 2019-07-27 17:57:33 +0900 |
commit | 6eb4e08636f48091f7783d52c84ef78e7ff1ada4 (patch) | |
tree | 2a91b898c007abfdf32e4261950a8625bc2749ca /src/indexer/segment_writer.rs | |
parent | c3231ca252da192e7e164b9b7474a6b99b85d7a7 (diff) |
add support for float (#603)
* add basic support for float
as for i64, they are mapped to u64 for indexing
query parser don't work yet
* Update value.rs
* implement support for float in query parser
* Update README.md
Diffstat (limited to 'src/indexer/segment_writer.rs')
-rw-r--r-- | src/indexer/segment_writer.rs | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/src/indexer/segment_writer.rs b/src/indexer/segment_writer.rs index b4c54c2..4dd73df 100644 --- a/src/indexer/segment_writer.rs +++ b/src/indexer/segment_writer.rs @@ -214,6 +214,17 @@ impl SegmentWriter { } } } + FieldType::F64(ref int_option) => { + if int_option.is_indexed() { + for field_value in field_values { + let term = Term::from_field_f64( + field_value.field(), + field_value.value().f64_value(), + ); + self.multifield_postings.subscribe(doc_id, &term); + } + } + } FieldType::Bytes => { // Do nothing. Bytes only supports fast fields. } |