kanchan
(kanchan)
September 8, 2017, 2:09pm
1
Hi,
I am trying to get exact value but it code is doing likely search:
GET /hist_latest/_search
{
"query": {
"bool": {
"should": [
{
"match": {
"bank_client_entity_name":"CNH CAPITAL RECEIVABLES"
}
}
]
}
}
}
Please give any solution for it.
What is the mapping for that field? Which version of Elasticsearch are you using?
kanchan
(kanchan)
September 11, 2017, 5:51am
3
elasticsearch version 5.3.0 and mapping for field bank_client_entity_name is given below:
{
"hist_latest": {
"mappings": {
"logs": {
"bank_client_entity_name": {
"full_name": "bank_client_entity_name",
"mapping": {
"bank_client_entity_name": {
"type": "text",
"fields": {
"keyword": {
"type": "keyword",
"ignore_above": 256
}
}
}
}
}
}
}
}
}
If you are looking for an exact match you can run a terms query against the keyword mapped subfield bank_client_entity_name.keyword
.
kanchan
(kanchan)
September 11, 2017, 9:15am
5
Thanks!!!!!!!!!!!! Christian_Dahlqvist, Its working fine.
system
(system)
Closed
October 9, 2017, 9:15am
6
This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.