And operator does not work as expected

I have customField which is the combination of

customFieldTypeId and value .
My Document content data something like this

For CustomeField.combined I want search using AND operator
I tried something like this(tried MatchQuery as well ).

if I search for query "query": "58c35ebb-86e6-4b2f-a151-28b8ddd99919 Bangkok",
it's give me data which has only 58c35ebb-86e6-4b2f-a151-28b8ddd99919 not bankok?
I am expecting it to return all the hits which has both 58c35ebb-86e6-4b2f-a151-28b8ddd99919 Bangkok.
Any suggestion what I am doing wrong

{
"profile": true,
"from": 0,
"size": 15,
"_source": [
"entity.names.fullName",
"entity.customFields",
"entity.names.caseId"
],
"sort": [
{
"entity.caseStatistics.countCategoriesByUnresolvedResults.Sanctions": {
"order": "desc"
}
},
{
"entity.outstandingActions": {
"order": "desc"
}
},
{
"entity.modificationDateByUser.utcDateTime": {
"order": "desc"
}
},
{
"entity.modifier.lastName": {
"order": "asc"
}
}
],
"query": {
"bool": {
"must": [
{
"bool": {
"should": [
{
"query_string": {

                                "fields": [
                                    "entity.customFields.combined"
                                ],
                                "query": "58c35ebb-86e6-4b2f-a151-28b8ddd99919 Bangkok",
                                "default_operator": "AND"
                               
                                
                                 
                                
                                
                            }
                        }
                        
                    ]
                }
            }
        ]
    }
}

}

Mysetting
"settings": {
"index": {
"mapper": {
"dynamic": "false"
},
"analysis": {
"analyzer": {
"custom_icu_analyzer": {
"filter": [
"lowercase"
],
"type": "custom",
"tokenizer": "icu_tokenizer"
},
"lowercase_keyword": {
"filter": [
"lowercase"
],
"tokenizer": "keyword"
},
"ducet_sort": {
"filter": [
"icu_collation"
],
"tokenizer": "keyword"
}
}
}
}
}

And Costume Field looks something like this

"customFields": [ {

                            "customFieldTypeId": "ab75e581-c31e-4b86-a81b-3f331f2ddcce",
                            "combined": "ab75e581-c31e-4b86-a81b-3f331f2ddcce|Andrew Wilson",
                            "value": "Andrew Wilson"
                          },
                       {
                            "customFieldTypeId": "97d5f242-b689-473e-a4cc-4a6ddbd4aae3",
                            "combined": "97d5f242-b689-473e-a4cc-4a6ddbd4aae3|Canada,Square TEST",
                            "value": "Canada,Square TEST"
                       
                       },
                       {
                            "customFieldTypeId": "8ee59ec9-bf6d-4c9c-8528-882412a1ea1f",
                            "combined": "8ee59ec9-bf6d-4c9c-8528-882412a1ea1f|Migration",
                            "value": "Migration"
                       
                       },
                           { "customFieldTypeId": "9af3ca31-56a1-4de9-a2f2-2308ba96c236",
                            "combined": "9af3ca31-56a1-4de9-a2f2-2308ba96c236|Santiago Del Estero,Argentina",
                            "value": "Santiago Del Estero,Argentina"
                           },
                        {
                            "customFieldTypeId": "58c35ebb-86e6-4b2f-a151-28b8ddd99919",
                            "combined": "58c35ebb-86e6-4b2f-a151-28b8ddd99919|A-00193476",
                            "value": "A-00193476"
                        
                        },
                        {
                            "customFieldTypeId": "ebaff5a9-2a8a-494e-a7ec-0d667a46e433",
                            "combined": "ebaff5a9-2a8a-494e-a7ec-0d667a46e433|18672_Batch 2 Finance Current Cust.csv_1349201800270",
                            "value": "18672_Batch 2 Finance Current Cust.csv_1349201800270"
                        }
                            
    ],

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