0

I need to remove the stop words from query in elasticsearch. I am able to apply analyzer at index level but let me know how to apply analyzer at query or search level in elasticsearch.

1 Answer 1

0

you have to configure your elasticsearch mappings to add search_analyzers to fields you want to analyze query time.

like

{
            "service" :{
                "_source" : {"enabled" : true },
                "properties":{
                    "name" : {"type" : "string", "index" : "not_analyzed"},
                    "name_snow":   { "type": "string", "search_analyzer": "simple_analyzer", "index_analyzer": "snowball_analyzer" }

                }
            }
        }

when you will query on this field, the terms entered will be analyzed first than queries in the shard.

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.