Hello @Emanuil,
Please find mapping for my title :
"title" : {
"type" : "text",
"fields" : {
"keyword" : {
"type" : "keyword",
"ignore_above" : 256
}
}
}
Mapping for my contentid:
"contentid" : {
"type" : "long"
}
and query sample where i want to use title and contentid for exact match :
{
"from": "1",
"size": "10",
"aggs": {
"content_type": {
"terms": {
"field": "content_type.keyword",
"size": 50
}
},
"content_subtype": {
"terms": {
"field": "content_subtype.keyword",
"size": 100
}
},
"helpdeskname": {
"terms": {
"field": "helpdeskname.keyword",
"size": 20
}
},
"keywords": {
"terms": {
"field": "keywords",
"size": 10
}
},
"segmentname": {
"terms": {
"field": "segmentname.keyword",
"size": 10
}
},
"category": {
"terms": {
"field": "category_paths.keyword",
"size": 10
}
},
"category_name": {
"terms": {
"field": "category_name.keyword",
"size": 5000
}
},
"template_field": {
"terms": {
"field": "template_field.keyword",
"size": 100
}
},
"scope": {
"terms": {
"field": "scope.keyword",
"size": 10
}
},
"lastmodified_year": {
"terms": {
"field": "lastmodified_year",
"size": 20,
"order": {
"_key": "asc"
}
}
},
"submitted_year": {
"terms": {
"field": "submitted_year",
"size": 30,
"order": {
"_key": "asc"
}
}
}
},
"query": {
"bool": {
"must": [
{
"terms": {
"event": [
"update",
"new"
]
}
},
{
"terms": {
"business_line": [
"3"
]
}
},
{
"terms": {
"status": [
"12"
]
}
},
{
"multi_match": {
"query": "oil",
"fields": [
"contentid^15",
"title^14",
"object_summary^13",
"keywords^12",
"content_type^11",
"content_subtype^10",
"ref_page_data^9",
"primary_mnemonic^8",
"secondary_mnemonic^7",
"quest_ids^6",
"template_field^5",
"submitted_for_name^4",
"content_authors^3",
"action_by^2",
"category_paths"
]
}
},
{
"terms": {
"segmentid": [
"18252"
]
}
}
],
"must_not": {
"match": {
"scope": "Local"
}
}
}
}
}
Regards,
Priyanka