小编use*_*375的帖子

Elasticsearch“设置”在Python模块中添加

如何将以下设置添加到 python elastic search 模块。请举个例子。我已经创建了索引和映射。但我被设置困住了。

curl -XPUT "http://localhost:9200/blurays " -d'
{
   "settings": {
     "analysis": {
     "filter": {
        "nGram_filter": {
           "type": "nGram",
           "min_gram": 2,
           "max_gram": 20,
           "token_chars": [
              "letter",
              "digit",
              "punctuation",
              "symbol"
           ]
        }
     },
     "analyzer": {
        "nGram_analyzer": {
           "type": "custom",
           "tokenizer": "whitespace",
           "filter": [
              "lowercase",
              "asciifolding",
              "nGram_filter"
           ]
        },
        "whitespace_analyzer": {
           "type": "custom",
           "tokenizer": "whitespace",
           "filter": [
              "lowercase",
              "asciifolding"
           ]
        }
     }
  }
 },
Run Code Online (Sandbox Code Playgroud)

python search elasticsearch

2
推荐指数
1
解决办法
4647
查看次数

标签 统计

elasticsearch ×1

python ×1

search ×1