文档不自动索引elasticsearch

时间:2015-09-22 17:57:06

标签: indexing elasticsearch

我创建了一个弹性搜索索引。它会正确搜索所有内容,但是当添加任何新文档时,它不会自动对其进行索引。每次我必须重新启动服务才能为新文档编制索引。

PUT /_river/mydocum1/_meta
{
"type": "fs",
"fs": {
  "url": "\\\\file\\datum\\Depart\\Inet\\",
  "update_rate": 3600,
  "includes": [
     "*.docx",
     "*.xlsx",
     "*.pdf",
     "*.txt",
     "*.doc",
     "*.xls"         
  ]
},
 "index": {
    "index": "test",
    "type": "docum",
    "bulk_size": 500
 }
}

编辑:

以下是设置

{
"test": {
  "settings": {
     "index": {
        "uuid": "9rofjAZySByrtehnjemkjudg",
        "analysis": {
           "filter": {
              "synonym_filter": {
                 "type": "synonym",
                 "synonyms_path": "analysis/main_synonym.txt"
              },
              "nGram_filter": {
                 "max_gram": "20",
                 "min_gram": "2",
                 "type": "nGram",
                 "token_chars": [
                    "letter",
                    "digit",
                    "punctuation",
                    "symbol"
                 ]
              }
           },
           "analyzer": {
              "search_analyzer_2": {
                 "type": "custom",
                 "filter": [
                    "lowercase",
                    "asciifolding",
                    "synonym_filter"
                 ],
                 "tokenizer": "standard"
              },
              "index_analyzer": {
                 "type": "custom",
                 "filter": [
                    "lowercase",
                    "asciifolding",
                    "nGram_filter"
                 ],
                 "tokenizer": "whitespace"
              },
              "search_analyzer": {
                 "type": "custom",
                 "filter": [
                    "lowercase",
                    "asciifolding",
                    "synonym_filter"
                 ],
                 "tokenizer": "whitespace"
              },
              "index_analyzer_2": {
                 "type": "custom",
                 "filter": [
                    "lowercase",
                    "asciifolding"
                 ],
                 "tokenizer": "whitespace"
              },
              "index_analyzer_3": {
                 "type": "custom",
                 "filter": [
                    "lowercase",
                    "asciifolding"
                 ],
                 "tokenizer": "standard"
              },
              "nGram_analyzer": {
                 "type": "custom",
                 "filter": [
                    "lowercase",
                    "asciifolding",
                    "nGram_filter"
                 ],
                 "tokenizer": "whitespace"
              },
              "index_analyzer_4": {
                 "type": "custom",
                 "filter": [
                    "lowercase",
                    "asciifolding"
                 ],
                 "tokenizer": "keyword"
              },
              "whitespace_analyzer": {
                 "type": "custom",
                 "filter": [
                    "lowercase",
                    "asciifolding"
                 ],
                 "tokenizer": "whitespace"
              }
           }
         }
       }
     }

有谁知道如何解决它?

0 个答案:

没有答案