Trait elastic::types::prelude::IpMapping [] [src]

pub trait IpMapping: Default + Default {
    fn boost() -> Option<f32> { ... }
fn doc_values() -> Option<bool> { ... }
fn index() -> Option<bool> { ... }
fn null_value() -> Option<Ipv4Addr> { ... }
fn store() -> Option<bool> { ... } }

The base requirements for mapping a ip type.

Custom mappings can be defined by implementing IpMapping.

Examples

Define a custom IpMapping:

#[derive(Default)]
struct MyIpMapping;
impl IpMapping for MyIpMapping {
    //Overload the mapping functions here
    fn boost() -> Option<f32> {
        Some(1.5)
    }
}

This will produce the following mapping:

{
    "type": "ip",
    "boost": 1.5
}

Provided Methods

Field-level index time boosting. Accepts a floating point number, defaults to 1.0.

Should the field be stored on disk in a column-stride fashion, so that it can later be used for sorting, aggregations, or scripting? Accepts true (default) or false.

Should the field be searchable? Accepts not_analyzed (default) and no.

Accepts a string value which is substituted for any explicit null values. Defaults to null, which means the field is treated as missing.

Whether the field value should be stored and retrievable separately from the _source field. Accepts true or false (default).

Implementors