I have documents with id fields
{id:domain-837}{id:domain-838}
these are automatically stored using mapping with data type keyword.
"id": {
"type": "text",
"fields": {
"keyword": {
"ignore_above": 256,
"type": "keyword"
}
}
},
Still when I search it using
MatchQuery,TermQuery I cannot get correct results.
{
"query": {
"match_phrase": {
"id": "domain-838"
}
}
}
{
"query": {
"terms": {
"_id": [
"domain-837"
]
}
}
}
There is a problem with hypen.
Has anyone solved this already can someone share how to define anyalyzer or what data type to use kindly share here