Elasticsearch better settings, mapping and queries to match with regular and nested fields

I have multi level nested list of objects along with regular fields to index in elasticsearch. For example here is a document:

 "main_field_1" : {
     "level_1" :  [
        "inner_level_1_field_1": "test-2",
        "inner_level_1_field_2": "test-2",
        "inner_level_1_field_3": [
              "level_2": {
                  "level_2_field_1": "TEST-2",
                   "level_2_field_2": "Test-2",
                   "level_2_field_3": .............
  "main_field_2": "test 2",

Can you please suggest a better settings/analyzer, mapping and query plan for this index so that when I will search by either "test-2" or "test 2" or "test2" or "Test 2" over all the mentioned fields here, i will get this (and all other matched) document(s) in response? I am using Elasticsearch version 7.17.5

Thank You

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