Struct tantivy::tokenizer::Token [] [src]

pub struct Token {
    pub offset_from: usize,
    pub offset_to: usize,
    pub position: usize,
    pub text: String,
}

Token

Fields

Offset (byte index) of the first character of the token. Offsets shall not be modified by token filters.

Offset (byte index) of the last character of the token + 1. The text that generated the token should be obtained by &text[token.offset_from..token.offset_to]

Position, expressed in number of tokens.

Actual text content of the token.

Trait Implementations

impl Default for Token
[src]

[src]

Returns the "default value" for a type. Read more