Following the contribution guidelines for Fuse.js, I’m posting this here, mostly for the devs working on Fuse.
I am evaluating client-side search tools, and I tried the demo for Fuse, but it’s producing results I didn’t expect. I don’t know if it’s a “bug”, or just expected behavior, but it was not what I expected.
The demo has a list of elements, the third element (from the top) looks like this:
{
"title": "HTML5",
"author": {
"firstName": "Remy",
"lastName": "Sharp"
}
},
The text “Remy” appears only in this one element.
If you enter “remy” as a search term, you get the following results:
[
{
"item": {
"title": "HTML5",
"author": {
"firstName": "Remy",
"lastName": "Sharp"
}
},
"refIndex": 2
},
{
"item": {
"title": "The Preservationist",
"author": {
"firstName": "David",
"lastName": "Maine"
}
},
"refIndex": 20
},
{
"item": {
"title": "Angels & Demons",
"author": {
"firstName": "Dan",
"lastName": "Brown"
}
},
"refIndex": 7
}
]
The search results correctly retrieve (and rank) the element with "firstName": "Remy"
, but I can’t figure out why the other two results are there. There doesn’t seem to be anything in the indexed data for these other results that contain the work “remy”.
I think I expected just one result.