I have set up FTS on my buckets and when trying to search for queries that have spaces, I’ve found it returns more than what I want.
Here is an example:
On an index I search the following: “+field: Key Word”. What I want it to return is any document in that bucket that contains “Key Word” exactly in the field “field”, however it returns documents that have just “Key” or “Word” or “Key Word” in the field “field”, which is not what I want to return.
Any ideas if this is possible or a different way to do this?
There are a few things that might be happening. To start out, I would suggest you check what analyzer are you using to make sure it’s handling spaces the way you want. Secondly, how are you performing the search? Is this a query string query or another type of query?
In full text search, the document text gets analyzed when you create the index, and part of the analysis is to break up the input text into tokens. Then, when you search, you need to use the same analyzer on your search query text so that the tokens you look for are the same as the ones that are in the index.