1
在https://gist.github.com/3442562當我重新啓動Elastic Search時,爲什麼我的分析儀消失?
完全依據我的分析:
"analyzer" : {
"lowercase_keyword" : {
"type" : "custom",
"tokenizer" : "keyword",
"filter" : ["lowercase", "trim"]
}
}
是在映射引用:
"location_countries" : {
"properties" : {
"country" : {
"type" : "string",
"analyzer" : "lowercase_keyword"
}
}
}
當我使用「國家」字段中的過濾器或該字段被(正確)視爲關鍵字。
curl -XGET 'localhost:9200/clinical_trials/_search?pretty=true' -d '
{
"query" : {
"term" : { "brief_title" : "dermatitis" }
},
"filter" : {
"term" : { "country" : "united states" }
},
"facets" : {
"tag" : {
"terms" : { "field" : "country" }
}
}
}
'
方面的結果:直到機器被重新啓動或彈性搜索服務被重新啓動
"facets" : {
"tag" : {
"_type" : "terms",
"missing" : 0,
"total" : 1,
"other" : 0,
"terms" : [ {
"term" : "united states",
"count" : 1
} ]
}
,一切工作正常。重啓後,我的所有過濾器都停止工作,就好像分析儀不存在一樣。
在對同一個數據結果同樣的查詢:
"facets" : {
"tag" : {
"_type" : "terms",
"missing" : 0,
"total" : 2,
"other" : 0,
"terms" : [ {
"term" : "united",
"count" : 1
}, {
"term" : "states",
"count" : 1
} ]
}
如果我詢問我的索引的_settings/_mappings,分析和映射仍然正確定義,但分析似乎沒有任何效果。
我在做什麼錯?
在此先感謝!
A刪除了所有對pyes的引用,因爲我能夠使用curl重新創建我的問題。 – 2012-08-24 17:09:41