0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 3 years have passed since last update.

Elasticsearch Kuromoji Pluginを使用したindexの生成方法

Last updated at Posted at 2019-12-20

以下のようにします。(Kuromoji Pluginインストール済み前提)

curl -H "Content-Type: application/json" -XPUT http://localhost:9200/[index名] -d '
{ 
    "settings": {
        "index": 
            { "analysis": 
                { "tokenizer": 
                    { "kuromoji_tokenizer" : 
                        { "type":"kuromoji_tokenizer" }
                    },
                    "analyzer": 
                    { "analyzer": 
                        { "type":"custom", "tokenizer": "kuromoji_tokenizer" }
                    }
                }
            }
        },
    "mappings": {
          "properties": {
            "[カラム名1]": {
              "type": "text",
              "analyzer": "analyzer"
            },
            "[カラム名2]": {
              "type": "text",
              "analyzer": "analyzer"
            }          }
      }
}'


0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?