I want to allow partial results while allowing multiple words. I noticed this issue #327 about suggestion. It works as expected with full words but seems to fail with partial matching.
const index = new Flexsearch.Index({ tokenize: 'forward' });
index.add(1, 'some words');
index.add(2, 'words variant');
index.add(3, 'this is a variant');
index.add(4, 'nothing');
console.clear();
console.log(index.search('word varia')); // -> [2]
console.log(index.search('word varia', { suggest: true })); // -> [ 2 ]
I would expect the last search to match 1 and 3 too (sorted it would give 2 first since it match both words).
Is there an option I missed or do the algorithm used by flexsearch does not allow this kind of matching ?
I want to allow partial results while allowing multiple words. I noticed this issue #327 about suggestion. It works as expected with full words but seems to fail with partial matching.
I would expect the last search to match
1
and3
too (sorted it would give 2 first since it match both words). Is there an option I missed or do the algorithm used by flexsearch does not allow this kind of matching ?