Am urmatoarele index index
{
"docs": {
"mappings": {
"text": {
"properties": {
"name": {
"type": "text",
"fields": {
"keyword": {
"type": "keyword",
"ignore_above": 256
}
}
}
"code": {
"type": "text",
"fields": {
"keyword": {
"type": "keyword",
"ignore_above": 256
}
}
}
}
}
}
}
}
"codul" poate avea valorile: ["a"], ["b"],["a","b"], sau []
Am nevoie de o interogare pentru a diminua valorile cu codul: "o" sau []. Oricine poate ajuta cu această întrebare, aici este ceea ce am încercat până acum w/out succes (acest lucru pare să spună "a" ȘI "[]"; vreau "o" SAU "[]").
"bool": {
"should": [
{
"match": {
"code": "a"
}
}
],
"must_not": [
{
"exists": {
"field": "code"
}
}
]
}