Option to disable correlative match
Hi,
I´m using a remote source and the server can also return synonyms to the entered text. You are comparing the result with the query and in my case it occurs the some results won´t contain the query so I never get them displayed.
For me I temporarily added an option "skipQueryComparison" that allows me to skip that check.
Snippet from the function "searchResult"
if (this.options.skipResultComparison === false) {
if (match < 0 && !correlativeMatch) continue;
}
//if (match < 0 && !correlativeMatch) continue;
if (this.options.offset && match !== 0) continue;
if (this.options.source[group].ignore && this.options.source[group].ignore.test(comparedDisplay)) continue;
Do you plan to integrate such an option an a future release or have I overlooked an existing way to accomplish this?
Thx Rupert
Hey Rupert,
you can check the source option in the documentation: filter: if set to false, no filtering will occur. Useful for options.dynamic datasets that comes already filtered from the backend
...
source: {
game: {
filter: false, // Here
url: [{
url: "http://www.gamer-hub.com/game/list.json",
dataType: "jsonp"
}, "data"]
}
}
Hi Tom,
thank you, works like a charm :+1:
Rupert
welcome