Make the engine support non-exact multi-words synonyms

This commit is contained in:
Clément Renault
2020-01-22 18:11:58 +01:00
parent 0b9fe2c072
commit a9adbda2cd
2 changed files with 39 additions and 31 deletions

View File

@ -65,7 +65,7 @@ fn highlights_from_raw_document<'a, 'tag, 'txn>(
for di in postings_list.iter() {
let covered_area = match kind {
Some(QueryKind::Exact(query)) | Some(QueryKind::Tolerant(query)) => {
Some(QueryKind::NonTolerant(query)) | Some(QueryKind::Tolerant(query)) => {
let len = if query.len() > input.len() {
input.len()
} else {