Struct rs_es::operations::search::highlight::Highlight [] [src]

pub struct Highlight {
    pub fields: HashMap<StringSetting>,
    pub pre_tags: Option<Vec<String>>,
    pub post_tags: Option<Vec<String>>,
    pub encoder: Option<Encoders>,
}

Fields

Methods

impl Highlight
[src]

Create an Highlight entity without any field or setting specified as they are supposed to be added via the add method.

Examples

use rs_es::operations::search::highlight::{Highlight, Setting, SettingTypes, Encoders};

let mut highlight = Highlight::new().with_encoder(Encoders::HTML).to_owned();
let setting = Setting::new().with_type(SettingTypes::Plain).to_owned();
highlight.add_setting("first_name".to_owned(), setting);

Add a field to highlight to the set

Trait Implementations

impl Debug for Highlight
[src]

Formats the value using the given formatter.

impl Clone for Highlight
[src]

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more