質問をすることでしか得られない、回答やアドバイスがある。

15分調べてもわからないことは、質問しよう!

新規登録して質問してみよう
ただいま回答率
85.48%
Elasticsearch

Elasticsearchは、クラウド向けに構築された、RESTful な API を提供する分散型のサーチエンジンアプリケーションです。

AWS(Amazon Web Services)

Amazon Web Services (AWS)は、仮想空間を機軸とした、クラスター状のコンピュータ・ネットワーク・データベース・ストーレッジ・サポートツールをAWSというインフラから提供する商用サービスです。

Q&A

解決済

1回答

358閲覧

AWS上にてcrowi-plusのElasticseachを使った検索機能の有効化に失敗する。

daichi.yonemura

総合スコア6

Elasticsearch

Elasticsearchは、クラウド向けに構築された、RESTful な API を提供する分散型のサーチエンジンアプリケーションです。

AWS(Amazon Web Services)

Amazon Web Services (AWS)は、仮想空間を機軸とした、クラスター状のコンピュータ・ネットワーク・データベース・ストーレッジ・サポートツールをAWSというインフラから提供する商用サービスです。

0グッド

0クリップ

投稿2018/02/07 06:05

前提・実現したいこと

crowi-plusの検索機能を有効にしたいです。

発生している問題・エラーメッセージ

現状、[Bulid Now]を行おうとすると以下のようなErrorが出力されます。

Error: [illegal_argument_exception] Rejecting mapping update to [crowi] as the final mapping would have more than 1 type: [pages, users] :: {"path":"/crowi","query":{},"body":"{\"settings\":{\"analysis\":{\"filter\":{\"english_stop\":{\"type\":\"stop\",\"stopwords\":\"_english_\"},\"english_stemmer\":{\"type\":\"stemmer\",\"language\":\"english\"},\"english_possessive_stemmer\":{\"type\":\"stemmer\",\"language\":\"possessive_english\"}},\"tokenizer\":{\"ngram_tokenizer\":{\"type\":\"ngram\",\"min_gram\":2,\"max_gram\":3,\"token_chars\":[\"letter\",\"digit\"]}},\"analyzer\":{\"autocomplete\":{\"tokenizer\":\"keyword\",\"filter\":[\"lowercase\",\"nGram\"]},\"japanese\":{\"tokenizer\":\"kuromoji_tokenizer\",\"char_filter\":[\"icu_normalizer\"]},\"english\":{\"tokenizer\":\"ngram_tokenizer\",\"filter\":[\"english_possessive_stemmer\",\"lowercase\",\"english_stop\",\"english_stemmer\"]}}}},\"mappings\":{\"users\":{\"properties\":{\"name\":{\"type\":\"text\",\"analyzer\":\"autocomplete\"}}},\"pages\":{\"properties\":{\"path\":{\"type\":\"text\",\"copy_to\":[\"path_raw\",\"path_ja\",\"path_en\"],\"index\":\"false\"},\"path_raw\":{\"type\":\"text\",\"analyzer\":\"standard\"},\"path_ja\":{\"type\":\"text\",\"analyzer\":\"japanese\"},\"path_en\":{\"type\":\"text\",\"analyzer\":\"english\"},\"body\":{\"type\":\"text\",\"copy_to\":[\"body_raw\",\"body_ja\",\"body_en\"],\"index\":\"false\"},\"body_raw\":{\"type\":\"text\",\"analyzer\":\"standard\"},\"body_ja\":{\"type\":\"text\",\"analyzer\":\"japanese\"},\"body_en\":{\"type\":\"text\",\"analyzer\":\"english\"},\"username\":{\"type\":\"text\"},\"comment_count\":{\"type\":\"integer\"},\"bookmark_count\":{\"type\":\"integer\"},\"like_count\":{\"type\":\"integer\"},\"created_at\":{\"type\":\"date\",\"format\":\"dateOptionalTime\"},\"updated_at\":{\"type\":\"date\",\"format\":\"dateOptionalTime\"}}}}}","statusCode":400,"response":"{\"error\":{\"root_cause\":[{\"type\":\"illegal_argument_exception\",\"reason\":\"Rejecting mapping update to [crowi] as the final mapping would have more than 1 type: [pages, users]\"}],\"type\":\"illegal_argument_exception\",\"reason\":\"Rejecting mapping update to [crowi] as the final mapping would have more than 1 type: [pages, users]\"},\"status\":400}"}

試したこと

Crowi-plusをインストールし、動作確認を行った後に
検索機能の有効化のため、ElasticSearchとプラグイン(kuromoji,
Analysis-ICU)のインストールを行いました。

その後、
crowi-plusでの設定(/etc/sysconfig/crowiに対して、ELASTICSEARCH_URI="http://localhost:9200"を追加)
Elasticseachでの設定(/etc/elasticsearch/elasticsearch.ymlに対してnetwork.host: 0.0.0.0を追加)
を行い、有効化を行おうとしたところ、上記のようなErrorが表示されます。

原因や、対処方法をご存知のかたいらっしゃいましたら
ご教授のほどよろしくお願いいたします。

気になる質問をクリップする

クリップした質問は、後からいつでもMYページで確認できます。

またクリップした質問に回答があった際、通知やメールを受け取ることができます。

バッドをするには、ログインかつ

こちらの条件を満たす必要があります。

guest

回答1

0

自己解決

crowi-plus/resource/search/mappings.jsonを切り戻すことで解決しました。
commit bc1aa0b(bc1aa0b6ea83a4e47fcccebebe5c0aba5c3991ec)に切り戻しました。

投稿2018/02/08 03:12

daichi.yonemura

総合スコア6

バッドをするには、ログインかつ

こちらの条件を満たす必要があります。

あなたの回答

tips

太字

斜体

打ち消し線

見出し

引用テキストの挿入

コードの挿入

リンクの挿入

リストの挿入

番号リストの挿入

表の挿入

水平線の挿入

プレビュー

15分調べてもわからないことは
teratailで質問しよう!

ただいまの回答率
85.48%

質問をまとめることで
思考を整理して素早く解決

テンプレート機能で
簡単に質問をまとめる

質問する

関連した質問