私はESウェブサイトでデモをしようとします:https://www.elastic.co/guide/en/elasticsearch/reference/current/_testing_analyzers.html - カスタムアナライザの最新の例。この例は機能しません。私は例でも何も変えなかった。私はそれがElasticsearchエラーだと思う。誰か助けてくれますか?以下では、ubuntu端末のElastichsearchを示すコマンドとエラーを示します。 私はこの例をelasticsearch-phpにしようとすると同じエラーが発生します。Elasticsearch v5アナライザデモのサンプルが動作しない
curl -XPUT 'localhost:9200/my_index?pretty' -d'
> {
> "settings": {
> "analysis": {
> "analyzer": {
> "std_folded": {
> "type": "custom",
> "tokenizer": "standard",
> "filter": [
> "lowercase",
> "asciifolding"
> ]
> }
> }
> }
> },
> "mappings": {
> "my_type": {
> "properties": {
> "my_text": {
> "type": "text",
> "analyzer": "std_folded"
> }
> }
> }
> }
> }'
{
"acknowledged" : true,
"shards_acknowledged" : true
}
良い、アナライザが作成した:彼の例に示すように、まず
は、私は、アナライザを作成します。しかし、ではない作品例をテスト:
curl -XGET 'localhost:9200/my_index/_analyze ?pretty' -d'
> {
> "analyzer": "std_folded",
> "text": "Is this déjà vu?"
> }'
そしてES私に答える:
{
"error":
{"root_cause":
[{
"type":"index_not_found_exception",
"reason":"no such index",
"resource.type":"index_or_alias",
"resource.id":"bad-request",
"index_uuid":"_na_",
"index":"bad-request"
}],
"type":"index_not_found_exception",
"reason":"no such index",
"resource.type":"index_or_alias",
"resource.id":"bad-request",
"index_uuid":"_na_",
"index":"bad-request"},
"status":404
}
は私が間違って何をしているのですか?私はすべてのインデックスを削除し、再度作成、私はelasticsearchを再開しようとしました - しかし、役に立たない。 P.P.私の悪い英語のためにすみません。
ありがとう@ ravi-naik!その作業!つまり、デモには構文エラーがあります。これは、「COPY AS CURL」を介してコピーすると、すべてが間違ったスペースでコピーされるためです。 –
正解、私は[問題を提出しました](https://github.com/elastic/docs/issues/139)、解決するかどうか確認しましょう。 – Val