elasticsearch,Search,elasticsearch" /> elasticsearch,Search,elasticsearch" />

如何在使用river插件时创建初始Elasticsearch设置

如何在使用river插件时创建初始Elasticsearch设置,search,elasticsearch,Search,elasticsearch,我正在使用CouchDB的river插件,当我执行以下curl命令时: curl -XPUT 'localhost:9200/_river/blog/_meta' -d '{ "type": "couchdb", "couchdb": { "host": "localhost", "port": 5984, "db": "blog", "filter": null }, "index": { "analysis": { "ana

我正在使用CouchDB的river插件,当我执行以下curl命令时:

curl -XPUT 'localhost:9200/_river/blog/_meta' -d '{
  "type": "couchdb",
  "couchdb": {
    "host": "localhost",
    "port": 5984,
    "db": "blog",
    "filter": null
  },
  "index": {
    "analysis": {
      "analyzer": {
        "whitespace": {
          "type": "whitespace",
          "filter": "lowercase"
        },
        "ox_edgeNGram": {
          "type": "custom",
          "tokenizer": "ox_t_edgeNGram",
          "filter": [
            "lowercase"
          ]
        },
        "ox_NGram": {
          "type": "custom",
          "tokenizer": "ox_t_NGram",
          "filter": [
            "lowercase"
          ]
        }
      },
      "tokenizer": {
        "ox_t_edgeNGram": {
          "type": "edgeNGram",
          "min_gram": 2,
          "max_gram": 25,
          "side": "front"
        },
        "ox_t_NGram": {
          "type": "NGram",
          "min_gram": 2,
          "max_gram": 25
        }
      }
    }
  }
}'
收到答复:

{
  "ok": true,
  "_index": "_river",
  "_type": "blog",
  "_id": "_meta",
  "_version": 1
}
我遇到的问题是,当我想在浏览器中查看设置并转到:
http://localhost:9200/blog/_settings?pretty=true

返回的json如下所示,但我希望得到有关我认为自己创建的分析器等的信息

返回的JSON:

{
  "blog": {
    "settings": {
      "index.number_of_shards": "5",
      "index.number_of_replicas": "1"
    }
  }
}
还应该注意的是,当我在不使用river的情况下创建博客索引并运行curl命令来输入分析信息时,我确实会从浏览器收到一个响应,指示我输入的设置

使用River插件时,如何设置索引的默认设置?

要解决此问题:

  • 创建新的Elasticsearch索引+映射等
  • 创建新的Elasticsearch river,将索引名称设置为步骤1中创建的索引名称
  • 我在这里找到了答案:

    要解决此问题,请执行以下操作:

  • 创建新的Elasticsearch索引+映射等
  • 创建新的Elasticsearch river,将索引名称设置为步骤1中创建的索引名称
  • 我在这里找到了答案:


    您可以尝试此url
    http://localhost:9200/blog/_mapping?pretty=true

    在响应映射中,如果没有明确提到分析器,那么它就是默认分析器。

    您可以尝试此url
    http://localhost:9200/blog/_mapping?pretty=true
    在响应映射中,如果没有明确提到分析器,那么它就是默认的分析器