[][src]Trait elastic::prelude::BooleanMapping

pub trait BooleanMapping {
    fn boost() -> Option<f32> { ... }
fn doc_values() -> Option<bool> { ... }
fn index() -> Option<bool> { ... }
fn null_value() -> Option<bool> { ... }
fn store() -> Option<bool> { ... } }

The base requirements for mapping a boolean type.

Custom mappings can be defined by implementing BooleanMapping.

Examples

Define a custom BooleanMapping:

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

This will produce the following mapping:

{
    "type": "boolean",
    "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<bool>

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...