Is there an existing issue for this?
Description of the bug
Number arrays not finding results.
The Fuse.js version where this bug is happening.
6.6.2
Is this a regression?
Which version did this behavior use to work in?
6.6.2
Steps To Reproduce
[
{
"title": "Some title",
"years": [2022, 2023]
}
]
const options = {
includeScore: true,
keys: ['title', 'years']
}
const fuse = new Fuse(list, options)
const result = fuse.search('2022')
Won't find the entry.
Changing the array from numbers to string it will work:
"years": [2022, 2023] ==> "years": ['2022', '2023']
But I need to actual numbers.
Note that this also works:
[
{
"title": "Some title",
"years": [
{ "year": 2022 },
{ "year": 2023 }
]
}
]
const options = {
includeScore: true,
keys: ['title', 'years.year']
}
const fuse = new Fuse(list, options)
const result = fuse.search('2022')
In that case the number is matched.
So it only happend for number arrays.
Expected behavior
Number arrays to be supported.
Screenshots
No response
Additional context
No response
Is there an existing issue for this?
Description of the bug
Number arrays not finding results.
The Fuse.js version where this bug is happening.
6.6.2
Is this a regression?
Which version did this behavior use to work in?
6.6.2
Steps To Reproduce
Won't find the entry.
Changing the array from numbers to string it will work:
"years": [2022, 2023]==>"years": ['2022', '2023']But I need to actual numbers.
Note that this also works:
In that case the number is matched.
So it only happend for number arrays.
Expected behavior
Number arrays to be supported.
Screenshots
No response
Additional context
No response