mirror of
https://github.com/meilisearch/MeiliSearch
synced 2025-07-04 20:37:15 +02:00
feat: Introduce the Serializer
Which will serialize documents fields as message pack in the kv-store
This commit is contained in:
parent
2a69170f14
commit
ea0ee070ef
5 changed files with 508 additions and 5 deletions
|
@ -23,6 +23,13 @@ impl Indexer {
|
|||
}
|
||||
}
|
||||
|
||||
pub fn with_word_limit(limit: usize) -> Indexer {
|
||||
Indexer {
|
||||
word_limit: limit,
|
||||
indexed: BTreeMap::new(),
|
||||
}
|
||||
}
|
||||
|
||||
pub fn index_text(&mut self, id: DocumentId, attr: SchemaAttr, text: &str) {
|
||||
for token in Tokenizer::new(text) {
|
||||
if token.word_index >= self.word_limit { break }
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue