mirror of
https://github.com/quickwit-oss/tantivy.git
synced 2026-06-05 01:50:42 +00:00
@@ -152,7 +152,7 @@ impl FastFieldReaders {
|
||||
/// Returns the `ip` fast field reader reader associated to `field`.
|
||||
///
|
||||
/// If `field` is not a u128 fast field, this method returns an Error.
|
||||
pub fn ip_addr(&self, field: Field) -> crate::Result<Arc<dyn Column<IpAddr>>> {
|
||||
pub fn ip_addr(&self, field: Field) -> crate::Result<Arc<dyn Column<Ipv6Addr>>> {
|
||||
self.check_type(field, FastType::U128, Cardinality::SingleValue)?;
|
||||
let bytes = self.fast_field_data(field, 0)?.read_bytes()?;
|
||||
Ok(open_u128::<IpAddr>(bytes)?)
|
||||
|
||||
@@ -99,7 +99,7 @@ impl Document {
|
||||
}
|
||||
|
||||
/// Add a IP address field
|
||||
pub fn add_ip_addr(&mut self, field: Field, value: IpAddr) {
|
||||
pub fn add_ip_addr(&mut self, field: Field, value: IpAddrV6) {
|
||||
self.add_field_value(field, value);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user