Struct rs_es::operations::search::highlight::Highlight
[−]
[src]
pub struct Highlight { pub fields: HashMap<String, Setting>, pub pre_tags: Option<Vec<String>>, pub post_tags: Option<Vec<String>>, pub encoder: Option<Encoders>, }
Fields
fields: HashMap<String, Setting>
encoder: Option<Encoders>
Methods
impl Highlight
[src]
fn new() -> Highlight
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);
fn with_encoder(&mut self, encoder: Encoders) -> &mut Highlight
fn add_setting(&mut self, name: String, setting: Setting)
Add a field to highlight to the set
Trait Implementations
impl Debug for Highlight
[src]
impl Clone for Highlight
[src]
fn clone(&self) -> Highlight
Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)
1.0.0
Performs copy-assignment from source
. Read more