~~NOCACHE~~ ## 4.Pipeline ドキュメントを登録する際に、指定したPluginで指定したFieldを処理する際にPipelineを使います。 {{:Aws:ElasticSearch:pasted:20210726-130642.png?direct 800x0}} ### 大項目 #### description Pipelineの説明(詳細割愛) #### processors 前処理について記載します。 ##### Pluginの利用 日本語抽出に利用するingest-attachmentを例に記載しています。 https://www.elastic.co/guide/en/elasticsearch/plugins/current/using-ingest-attachment.html その他のプラグインは[[https://www.elastic.co/guide/en/elasticsearch/plugins/current/plugin-management.html|プラグイン]]のガイドの記載方に合わせてください。 ["field" : "message"]の部分がdocument登録の際、pluginに渡されるFieldになります。[[Aws:ElasticSearch:RegisterJapaneseFile#Logstash|messageはLogstashからESに渡す際のfield]] { "attachment" : { "description" : "Extract attachment information", "processors" : [ { "attachment" : { "field" : "message", "indexed_chars" : -1, "properties" : [ "content", "content_type", "title", "author", "keywords", "date", "content_length", "language" ] } } ] } } ##### Processorsの利用 区切り文字で分割するsplitプロセッサを例に記載しています。 https://www.elastic.co/guide/en/elasticsearch/reference/current/split-processor.html その他のプロセッサは[[https://www.elastic.co/guide/en/elasticsearch/reference/current/processors.html|プロセッサ]]のガイドの記載方に合わせてください。 { "description": "Extract attachment information", "processors": [ { "split": { "field": "data", "separator": ",", "preserve_trailing": true } } ] } {{tag>AWS ElasticSearch}}