Open davidmz opened 5 years ago
Thanks for the report. Would you want to provide a PR handling this case?
Thanks @rschick 👍 Merged and published as v1.5.1.
Hey - with 1.6.0, I'm seeing the following:
searchQueryParse('-banana', {tokenize: true, offsets: false})
{
"exclude": {
"text": "banana"
}
}
searchQueryParse('-banana', {tokenize: true, offsets: false, alwaysArray: true})
{
"exclude": {
"text": "banana"
}
}
But doing multiple values works:
searchQueryParse('-banana -baddie', {tokenize: true, offsets: false})
{
"exclude": {
"text": [
"banana",
"baddie"
]
}
}
Thanks @LordMike , I confirm I see the same issue. I added 4 more tests in #50 , 2 of them are failing due to this bug. I don't have time to work on this at the moment but will follow up on the PR if anyone can help out.
See example at: https://runkit.com/davidmz/5c86c4ecc72b580012f955eb
I expect that it should be
exclude: {in: ["space"]}
but gotexclude: {in: "space"}