Closed elega9t closed 3 years ago
That should definitely work- could you post your code?
Update the query in https://github.com/fergiemcdowall/search-index-issue-537 returns 0 results
console.log(JSON.stringify(await QUERY({
OR: ['dchaudron0@gravatar.com']
}), null, 2))
This has to do with the way the indexer works- it strips out all of the non-alphanumeric characters such that dchaudron0@gravatar.com
becomes dchaudron0gravatarcom
.
The easiest way to fix this is to change the json file to pass the email as an array email: ["dchaudron0@gravatar.com"]
. This forces search-index
to skip tokenisation, and you should then be able to search for "dchaudron0@gravatar.com" and get hits.
Great, thanks. It would be useful to be able to control tokenisation per field.
Hi,
I have documents that have email and uuids as field values. When I search by email, there are no results returned, same with searching by uuid.
I checked the documentation and didn't find a reference to how to achieve this in search-index.
Thanks