The requested URL was not found on this server. 不管你信不信,反正我是没找到

关于CPU的问题

Elasticsearch | 作者 mai | 发布于2019年08月23日 | 阅读数:1188

请问一下,机器都是32CPU,1core和8core哪种好一些?我把以前1core改成8core之后发现索引速度下降了。
已邀请:

mai - 90后研究生

赞同来自:

顺便问一下我的index设置是否合理
PUT java
{
  "settings": {
    "index":{
      "sort.field": "project",
      "sort.order": "desc"
    },
    "number_of_shards": 4,
    "number_of_replicas": 0,
    "refresh_interval": "-1", 
    "index.merge.scheduler.max_thread_count":1,
    "index.codec": "best_compression",
    "index.translog":{
      "sync_interval": "120s",
      "durability": "async"
    },
    
    "index.search.slowlog.threshold.query.warn": "1s",
    "index.search.slowlog.threshold.query.info": "800ms",
    "index.search.slowlog.threshold.query.debug": "2s",
    "index.search.slowlog.threshold.query.trace": "500ms",
   
    "index.search.slowlog.threshold.fetch.warn": "1s",
    "index.search.slowlog.threshold.fetch.info": "800ms",
    "index.search.slowlog.threshold.fetch.debug": "500ms",
    "index.search.slowlog.threshold.fetch.trace": "200ms",
    
    "index.indexing.slowlog.threshold.index.warn": "10s",
    "index.indexing.slowlog.threshold.index.info": "2s",
    "index.indexing.slowlog.threshold.index.debug": "5s",
    "index.indexing.slowlog.threshold.index.trace": "500ms",

    "analysis": {
        "analyzer": {
          "my_analyzer": {
            "char_filter": [
              "html_strip"
            ],
            "type": "custom",
            "tokenizer": "ik_max_word",
            "filter":["hagongda",
            "baidu",
            "sichuangdaxue",
            "chinese"
            ]
          }
        },
        "filter": {
          "baidu":{
            "type":"stop",
            "stopwords_path": "stopwords/baidu.txt"
          },
          "sichuangdaxue":{
            "type":"stop",
            "stopwords_path": "stopwords/sichuangdaxue.txt"
          },
           "hagongda":{
            "type":"stop",
            "stopwords_path": "stopwords/hagongda.txt"
          },
           "chinese":{
            "type":"stop",
            "stopwords_path": "stopwords/chinese.txt"
          }
        }
    }
  },
  "mappings": {
    "dynamic": "strict",
    "_field_names":{
        "enabled":false
      },
    "properties": {
      "project":{
        "type": "keyword",
        "norms": false
      },
      "filename":{
        "type": "keyword",
        "norms": false,
        "doc_values": false
      },
      "user_filename":{
        "type": "keyword",
        "norms": false,
        "doc_values": false
      },
      "code":{
        "type": "text",
        "norms": false,
        "doc_values": false,
        "index_options": "offsets", 
        "analyzer": "my_analyzer"
      }
    }
  }
}

要回复问题请先登录注册