mirror of
https://github.com/quickwit-oss/tantivy.git
synced 2026-05-29 06:30:41 +00:00
group montonic mapping and inverse
fix mapping inverse remove ip indexing add get_between_vals test
This commit is contained in:
@@ -319,7 +319,7 @@ impl MultiValueU128FastFieldWriter {
|
||||
let value = field_value.value();
|
||||
let ip_addr = value
|
||||
.as_ip()
|
||||
.expect(&format!("expected and ip, but got {:?}", value));
|
||||
.unwrap_or_else(|| panic!("expected and ip, but got {:?}", value));
|
||||
let value = ip_addr.to_u128();
|
||||
self.add_val(value);
|
||||
}
|
||||
|
||||
@@ -331,7 +331,7 @@ impl U128FastFieldWriter {
|
||||
Some(v) => {
|
||||
let ip_addr = v
|
||||
.as_ip()
|
||||
.expect(&format!("expected and ip, but got {:?}", v));
|
||||
.unwrap_or_else(|| panic!("expected and ip, but got {:?}", v));
|
||||
|
||||
let value = ip_addr.to_u128();
|
||||
self.add_val(value);
|
||||
|
||||
@@ -294,13 +294,7 @@ impl SegmentWriter {
|
||||
ctx,
|
||||
)?;
|
||||
}
|
||||
FieldType::IpAddr(_) => {
|
||||
for value in values {
|
||||
let ip_val = value.as_ip().ok_or_else(make_schema_error)?;
|
||||
term_buffer.set_text(&ip_val.to_string());
|
||||
postings_writer.subscribe(doc_id, 0u32, term_buffer, ctx);
|
||||
}
|
||||
}
|
||||
FieldType::IpAddr(_) => {}
|
||||
}
|
||||
}
|
||||
Ok(())
|
||||
|
||||
Reference in New Issue
Block a user