【发布时间】:2015-01-16 23:52:17
【问题描述】:
我正在尝试使用 elasticsearch 来索引有关研究论文的一些数据。但我不喜欢口音。例如,如果我使用:
GET /_analyze?tokenizer=standard&filter=asciifolding&text="Boletínes de investigaciónes"我明白了
{
"tokens": [
{
"token": "Bolet",
"start_offset": 1,
"end_offset": 6,
"type": "<ALPHANUM>",
"position": 1
},
{
"token": "nes",
"start_offset": 7,
"end_offset": 10,
"type": "<ALPHANUM>",
"position": 2
},
{
"token": "de",
"start_offset": 11,
"end_offset": 13,
"type": "<ALPHANUM>",
"position": 3
},
{
"token": "investigaci",
"start_offset": 14,
"end_offset": 25,
"type": "<ALPHANUM>",
"position": 4
},
{
"token": "nes",
"start_offset": 26,
"end_offset": 29,
"type": "<ALPHANUM>",
"position": 5
}
]
}
我应该得到类似的东西
{
"tokens": [
{
"token": "Boletines",
"start_offset": 1,
"end_offset": 6,
"type": "<ALPHANUM>",
"position": 1
},
{
"token": "de",
"start_offset": 11,
"end_offset": 13,
"type": "<ALPHANUM>",
"position": 3
},
{
"token": "investigacion",
"start_offset": 14,
"end_offset": 25,
"type": "<ALPHANUM>",
"position": 4
}
]
}
我该怎么办?
【问题讨论】:
-
我尝试在浏览器中发布 uri,我得到了预期的输出。 localhost:9200/…
-
是的,在另一台机器上按预期工作,但在我的机器上不行!
标签: elasticsearch