[][src]Trait elastic_types::ip::mapping::IpMapping

pub trait IpMapping {
    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

fn boost() -> Option<f32>

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

fn doc_values() -> Option<bool>

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.

fn index() -> Option<bool>

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

fn null_value() -> Option<Ipv4Addr>

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

fn store() -> Option<bool>

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

Loading content...

Implementors

Loading content...