-1

I have a search functionality implemented and i am trying to search string that contains "." or "-" e.g a-test or a.test

Can you please how to do it as my existing query is not helping : {"query":{"query_string":{"query":"a-f*","default_field":"description","fields":[],"type":"best_fields","default_operator":"or","max_determinized_states":10000,"enable_position_increments":true,"fuzziness":"AUTO","fuzzy_prefix_length":0,"fuzzy_max_expansions":50,"phrase_slop":0,"escape":false,"auto_generate_synonyms_phrase_query":true,"fuzzy_transpositions":true,"boost":1.0}},"aggregations":{"buckets":.......................... rest aggregation

1 Answers1

0

What is your field analyzer that is set in the mapping?

Abd Rmdn
  • 480
  • 4
  • 11
  • I am new to the elastic search. can you help where to add mapping as of now i have added no mapping in config file if thats what you are asking. – user3489632 Dec 05 '19 at 09:44
  • By mapping here I meant the schema of your document (fields in it and how are they analyzed by Elasticsearch). https://www.elastic.co/guide/en/elasticsearch/reference/current/indices-get-mapping.html – Abd Rmdn Dec 05 '19 at 10:05