Elastic search not giving result when Hyphen is used in search text

29 views Asked by At

my get query is like this, Whenever I search my Unit it is working fine but If I write full text including this character Hyphen - it is not giving any result. tried to change analyzer etc but nothing worked for me

{
    "size": 0,
    "query": {
        "bool": {
            "must": [
                {
                    "match": {
                        "account_id": 12312
                    }
                },
                {
                    "multi_match": {
                        "fuzziness": "1",
                        "prefix_length": 1,
                        "query": "my Unit - testing bot",
                        "type": "most_fields",
                        "fields": [
                            "title.value^11",
                            "table_name^10",
                            "node_name^9",
                            "node_desc^9",
                           
                        ],
                        "operator": "and"
                    }
                }
            ],
            "filter": [],
            "must_not": {
                "terms": {
                    "published_status.raw": [
                        "Disabled"
                    ]
                }
            }
        }
    },
    "aggs": {
        "nodes_count": {
            "terms": {
                "field": "_index"
            }
        }
    }
}
0

There are 0 answers