mirror of
https://github.com/meilisearch/MeiliSearch
synced 2024-11-22 21:04:27 +01:00
clean unused functions
This commit is contained in:
parent
6f534540a6
commit
e078eafb1f
@ -122,7 +122,7 @@ impl ToString for RankingRule {
|
||||
RankingRule::Words => "_words".to_string(),
|
||||
RankingRule::Proximity => "_proximity".to_string(),
|
||||
RankingRule::Attribute => "_attribute".to_string(),
|
||||
RankingRule::WordsPosition => "_word_position".to_string(),
|
||||
RankingRule::WordsPosition => "_words_position".to_string(),
|
||||
RankingRule::Exact => "_exact".to_string(),
|
||||
RankingRule::Asc(field) => format!("asc({})", field),
|
||||
RankingRule::Dsc(field) => format!("dsc({})", field),
|
||||
|
@ -1,5 +1,5 @@
|
||||
use std::sync::Arc;
|
||||
use std::collections::{HashMap, BTreeMap, BTreeSet};
|
||||
use std::collections::HashMap;
|
||||
|
||||
use chrono::{DateTime, Utc};
|
||||
use heed::types::{ByteSlice, OwnedType, SerdeBincode, Str};
|
||||
@ -134,8 +134,7 @@ impl Main {
|
||||
|
||||
pub fn put_stop_words_fst(self, writer: &mut heed::RwTxn<MainT>, fst: &fst::Set) -> ZResult<()> {
|
||||
let bytes = fst.as_fst().as_bytes();
|
||||
self.main
|
||||
.put::<_, Str, ByteSlice>(writer, STOP_WORDS_KEY, bytes)
|
||||
self.main.put::<_, Str, ByteSlice>(writer, STOP_WORDS_KEY, bytes)
|
||||
}
|
||||
|
||||
pub fn stop_words_fst(self, reader: &heed::RoTxn<MainT>) -> ZResult<Option<fst::Set>> {
|
||||
@ -213,30 +212,6 @@ impl Main {
|
||||
self.main.delete::<_, Str>(writer, RANKING_DISTINCT_KEY)
|
||||
}
|
||||
|
||||
pub fn stop_words<'txn>(&self, reader: &'txn heed::RoTxn<MainT>) -> ZResult<Option<BTreeSet<String>>> {
|
||||
self.main.get::<_, Str, SerdeBincode<BTreeSet<String>>>(reader, STOP_WORDS_KEY)
|
||||
}
|
||||
|
||||
pub fn put_stop_words(self, writer: &mut heed::RwTxn<MainT>, value: BTreeSet<String>) -> ZResult<()> {
|
||||
self.main.put::<_, Str, SerdeBincode<BTreeSet<String>>>(writer, STOP_WORDS_KEY, &value)
|
||||
}
|
||||
|
||||
pub fn delete_stop_words(self, writer: &mut heed::RwTxn<MainT>) -> ZResult<bool> {
|
||||
self.main.delete::<_, Str>(writer, STOP_WORDS_KEY)
|
||||
}
|
||||
|
||||
pub fn synonyms<'txn>(&self, reader: &'txn heed::RoTxn<MainT>) -> ZResult<Option<BTreeMap<String, Vec<String>>>> {
|
||||
self.main.get::<_, Str, SerdeBincode<BTreeMap<String, Vec<String>>>>(reader, SYNONYMS_KEY)
|
||||
}
|
||||
|
||||
pub fn put_synonyms(self, writer: &mut heed::RwTxn<MainT>, value: BTreeMap<String, Vec<String>>) -> ZResult<()> {
|
||||
self.main.put::<_, Str, SerdeBincode<BTreeMap<String, Vec<String>>>>(writer, SYNONYMS_KEY, &value)
|
||||
}
|
||||
|
||||
pub fn delete_synonyms(self, writer: &mut heed::RwTxn<MainT>) -> ZResult<bool> {
|
||||
self.main.delete::<_, Str>(writer, SYNONYMS_KEY)
|
||||
}
|
||||
|
||||
pub fn put_customs(self, writer: &mut heed::RwTxn<MainT>, customs: &[u8]) -> ZResult<()> {
|
||||
self.main
|
||||
.put::<_, Str, ByteSlice>(writer, CUSTOMS_KEY, customs)
|
||||
|
Loading…
Reference in New Issue
Block a user