Adds TODO
This commit is contained in:
parent
5128796825
commit
cb33c96548
1 changed files with 2 additions and 1 deletions
|
@ -136,7 +136,8 @@ struct TextFieldIndex {
|
||||||
|
|
||||||
impl TextFieldIndex {
|
impl TextFieldIndex {
|
||||||
pub fn insert(&mut self, raw_value: &str, value: Spur, key: SongKey) {
|
pub fn insert(&mut self, raw_value: &str, value: Spur, key: SongKey) {
|
||||||
// TODO sanitize ngrams
|
// TODO sanitize ngrams to be case insensitive, free from diacritics and punctuation
|
||||||
|
// And do the same thing to query fragments!
|
||||||
let characters = raw_value.chars().collect::<TinyVec<[char; 32]>>();
|
let characters = raw_value.chars().collect::<TinyVec<[char; 32]>>();
|
||||||
for substring in characters[..].windows(NGRAM_SIZE) {
|
for substring in characters[..].windows(NGRAM_SIZE) {
|
||||||
self.ngrams
|
self.ngrams
|
||||||
|
|
Loading…
Add table
Reference in a new issue