Closed rlingineni closed 5 years ago
using the tokenizer for the query seems to have fixed it. Hopefully, it doesn't have too much of a performance impact.
// exact matches should have the highest boost
this.term(lunr.tokenizer(query), { boost: 100 });
I am building an autocomplete index for my search data, and I want the titles back, not necessarily the id.
A sample document:
My index has the ref as
title
.Here is the query function I am using for autocomplete:
Performing
this.query('get out')
yields no results, however,this.query('get')
yields the proper result set. Not sure if this is because of case sensitivity, or something I am missing for the exact match case.However, if I use the
search
function instead ofquery
, it does give me an exact match.Is it because when indexing, the ref is split up and spaces are ignored?