Hi, I have an issue with query, I want the search case insensitive, but I don't know what's wrong with my mapping file?
the below query returns result properly.
{
"query": {
"bool": {
"must": [
{
"wildcard": {
"booking.cparty1": {
"wildcard": "manitoba*",
"boost": 1
}
}
}
],
"disable_coord": false,
"adjust_pure_negative": true,
"boost": 1
}
}
}
but the blow query returns nothing
{
"query": {
"bool": {
"must": [
{
"wildcard": {
"booking.cparty1": {
"wildcard": "MANITOBA*",
"boost": 1
}
}
}
],
"disable_coord": false,
"adjust_pure_negative": true,
"boost": 1
}
}
}
``````````````````
my mapping file:
`````````````````````
{
"state": "open",
"settings": {
"index": {
"mapping": {
"total_fields": {
"limit": "2000"
}
},
"number_of_shards": "5",
"provided_name": "trades_dpm_slave",
"creation_date": "1514560558202",
"number_of_replicas": "1",
"uuid": "6Oq5mbLzTGOaPFE05ogg_A",
"version": {
"created": "5060499"
}
}
},
"mappings": {
"trade": {
"_all": {
"enabled": false
},
"properties": {
"booking": {
"properties": {
"bookrunnerUpdate": {
"type": "date"
},
"linkedID": {
"type": "text",
"fields": {
"keyword": {
"type": "keyword",
"doc_values": false
}
}
},
"parent": {
"type": "text",
"fields": {
"keyword": {
"type": "keyword",
"doc_values": false
}
}
},
"bookRunnerUpdateTime": {
"type": "date"
},
"confirmationType": {
"include_in_all": true,
"type": "text",
"fields": {
"keyword": {
"type": "keyword",
"doc_values": false
}
}
},
"book": {
"include_in_all": true,
"type": "text",
"fields": {
"keyword": {
"type": "keyword",
"doc_values": false
}
}
},
"dealerIDUpdate": {
"type": "date"
},
"notepad": {
"index": false,
"type": "text"
},
"bookrunner": {
"index": false,
"type": "text"
},
"bookingPurpose": {
"index": false,
"type": "text"
},
"createdOn": {
"type": "date"
},
"originated": {
"type": "text",
"fields": {
"keyword": {
"type": "keyword"
}
}
},
"notionalMatch": {
"type": "boolean"
},
"dealRevenue": {
"type": "text"
},
"dealerUpdateTime": {
"type": "date"
},
"cparty1": {
"include_in_all": true,
"type": "text",
"fields": {
"keyword": {
"type": "keyword"
}
}
},
"notionalTrade": {
"type": "boolean"
},
"cparty2": {
"type": "text",
"fields": {
"keyword": {
"type": "keyword"
}
}
},
"id": {
"include_in_all": true,
"fielddata": true,
"boost": 2,
"type": "text",
"fields": {
"keyword": {
"type": "keyword"
}
}
},
"terminated": {
"type": "text"
},
"ticket": {
"include_in_all": true,
"boost": 2,
"type": "text",
"fields": {
"keyword": {
"type": "keyword"
}
}
},
"bookingSubPurpose": {
"type": "text"
},
"executedOn": {
"type": "date"
},
"transProductID": {
"include_in_all": true,
"type": "keyword"
},
"inceptionCVA": {
"type": "text"
},
"tradeDate": {
"type": "date"
},
"dealType": {
"include_in_all": true,
"type": "keyword"
},
"version": {
"type": "short"
},
"createdBy": {
"type": "keyword"
},
"affirmStatus": {
"type": "keyword"
},
"name": {
"type": "text",
"fields": {
"keyword": {
"type": "keyword"
}
}
},
"folderName": {
"include_in_all": true,
"type": "text",
"fields": {
"keyword": {
"type": "keyword"
}
}
},
"marketerId": {
"include_in_all": true,
"type": "text",
"fields": {
"keyword": {
"type": "keyword"
}
}
},
"confirmationID": {
"include_in_all": true,
"type": "text",
"fields": {
"keyword": {
"type": "keyword"
}
}
},
"entity": {
"type": "text",
"fields": {
"keyword": {
"type": "keyword"
}
}
},
"status": {
"include_in_all": true,
"type": "keyword"
}
}
},
"_default_": {
"_all": {
"enabled": false
}
}
}
}
}
}