I have a index that returns jobs in different languages.
I need to search similar jobs as per a single text that to a single language. So let's say, I have set 1 as LanguageId for English. And I want to search jobs matching with account. So if I write below query, it fetch jobs with all different languages. So basically the "must" query is not having any impact.
GET jobs/_search
{
"query": {
"bool": {
"must": [
{
"match": {
"languageid": "1"
}
}
]
}
},
"suggest": {
"suggestions": {
"text": "acce",
"completion": {
"field": "jobs.suggest",
"size": 30
}
}
}
}
My mapping looks as below
"mappings": {
"jobs": {
"properties": {
"@timestamp": {
"type": "date"
},
"@version": {
"type": "text"
},
"industytype": {
"type": "text",
"fields": {
"keyword": {
"type": "keyword",
"ignore_above": 256
}
}
},
"jobs": {
"properties": {
"suggest": {
"type": "completion",
"analyzer": "simple",
"preserve_separators": true,
"preserve_position_increments": true,
"max_input_length": 50
}
}
},
"language": {
"type": "text",
"fields": {
"keyword": {
"type": "keyword",
"ignore_above": 256
}
}
},
"type": {
"type": "text",
"fields": {
"keyword": {
"type": "keyword",
"ignore_above": 256
}
}
},
"updateddate": {
"type": "date"
}
}
}
}
}