File tree 3 files changed +8
-3
lines changed
3 files changed +8
-3
lines changed Original file line number Diff line number Diff line change @@ -365,7 +365,9 @@ impl MultiValueU128FastFieldWriter {
365
365
for field_value in doc. field_values ( ) {
366
366
if field_value. field == self . field {
367
367
let value = field_value. value ( ) ;
368
- let ip_addr = value. as_ip ( ) . unwrap ( ) ;
368
+ let ip_addr = value
369
+ . as_ip ( )
370
+ . expect ( & format ! ( "expected and ip, but got {:?}" , value) ) ;
369
371
let value = ip_addr. to_u128 ( ) ;
370
372
self . add_val ( value) ;
371
373
}
Original file line number Diff line number Diff line change @@ -329,7 +329,10 @@ impl U128FastFieldWriter {
329
329
pub fn add_document ( & mut self , doc : & Document ) {
330
330
match doc. get_first ( self . field ) {
331
331
Some ( v) => {
332
- let ip_addr = v. as_ip ( ) . unwrap ( ) ;
332
+ let ip_addr = v
333
+ . as_ip ( )
334
+ . expect ( & format ! ( "expected and ip, but got {:?}" , v) ) ;
335
+
333
336
let value = ip_addr. to_u128 ( ) ;
334
337
self . add_val ( value) ;
335
338
}
Original file line number Diff line number Diff line change @@ -5,8 +5,8 @@ use serde::{Deserialize, Serialize};
5
5
use serde_json:: Value as JsonValue ;
6
6
use thiserror:: Error ;
7
7
8
- use super :: Cardinality ;
9
8
use super :: ip_options:: IpOptions ;
9
+ use super :: Cardinality ;
10
10
use crate :: schema:: bytes_options:: BytesOptions ;
11
11
use crate :: schema:: facet_options:: FacetOptions ;
12
12
use crate :: schema:: {
You can’t perform that action at this time.
0 commit comments