Hello folks, I’m new to this topic, so sorry, if this is a stupid question.
I have a field “address” that has leucene.standard as both index analyzer and search analyzer.
The problem is if the search query has lots of whitespace, it’s taking a lot of time.
For search query
{
"$search": {
"index": "address_book",
"text": {
"path": "address",
"query": "John Lake Shore Drive 4237, Texas, USA",
}
}
Since, the USA and Texas are more common terms it’s getting long time to respond.
However, if I try leucene.keyword for both index analyzer and search analyzer, I don’t get results if my query is “John Lake” or “John Lake Shore Drive” or “Shore Drive”.
- What can I do in this case? Can I use leucene.keyword as index analyzer and leucene.standard as search analyzer to get the results?
- Will it be faster and generate results for above mentioned cases?
- Using different analyzers is not recommended as per the documentation? WHat sorts of problems will I be looking into?