0
我已索引2點的對象(ES 1.5)布爾濾波器破折號沒有結果ElasticSearch返回上含有
{
tags: ["tag1","bla-bla"]
}
{
tags: ["tag2"]
}
如果我提出這一要求:
{
"query": {
"filtered": {
"filter": {
"bool": {
"should":
[
{
"term": {
"tags": "bla-bla"
}
}
]
}
}
}
}
}
彈性返回沒有結果因爲有「標籤」字段中的「」 - 「」。
如果我搜索這個,它的作品,我有個結果1:
...
"term": {
"tags": "tag1"
}
...
有人可以解釋爲什麼當我把一個破折號(「 - 」)在「標籤」字段中,有沒有結果呢?
謝謝,我說「‘指數’:‘not_analyzed’」中的映射,標籤上的領域,現在它的工作原理。 –