Queries don't work as expected

I have a field named requestUri on Elastic server. It has values like "/api/v1/log/rest", "/api/v1/log/notification" etc.
A user of the app I am working on should be able to filter those values. First, I tried to propagate the user's input as a simple match query but i get too many results because the default operator is OR. Then I changed the operator to AND and got expected results when had full words in query, but if a query contained only a part of a word I got nothing, e.g. /api/v1/log/re. Tried another queries (e.g. add stars to the user's input and tried wildcard query) but didn't have luck.

Can anyone help me to solve this? I don't think I can configure the index because it's automatically created by logstash every day.

Maybe use the path_hierarchy tokenizer (https://www.elastic.co/guide/en/elasticsearch/reference/current/analysis-pathhierarchy-tokenizer.html) in your index analyzer and a simple keyword tokenizer in your search analyzer?

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.