나는 다음과 같은 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
}
}
}
}
}
}
}
}
""코드 값을 가질 수 있습:["a"],["b"],["a","b"]또는[]
필요한 쿼리를 해소하는 값으로 코드:"a"또는[]. 사람이 도움이 될 수 있습니다 이 쿼리,여기에 무엇이 내가 지금까지 시도 w/밖으로 성공을(이 말은"a"AND"[]";고 싶은""또는"[]").
"bool": {
"should": [
{
"match": {
"code": "a"
}
}
],
"must_not": [
{
"exists": {
"field": "code"
}
}
]
}