Elasticsearch 搭建集群经验

 

以下是 Elasticsearch-rtf-2.2.1 版本的Elasticsearch.yml 配置文件。

新建集群的第一个节点,配置务必简单,否则,若无法选举出master节点,整个集群会失败。

一般地,集群中的第一个节点,必须是master节点。

master 节点



master 节点配置如下。

   1: # ======================== Elasticsearch Configuration =========================
   2:  
   3: #
   4:  
   5: # 注意: Elasticsearch 大多数设置都有默认值.
   6:  
   7: #       在你着手调整和优化配置之前,确保你明白你期望什么,得到什么结果
   8:  
   9: #
  10:  
  11: # 配置一个节点的主要方式就是通过该文件. 该模板列出了大多数重要的设置.
  12:  
  13: #
  14:  
  15: # 更多配置选项参见如下链接:
  16:  
  17: # <http://www.elastic.co/guide/en/elasticsearch/reference/current/setup-configuration.html>
  18:  
  19: #
  20:  
  21: # ---------------------------------- 集群 -----------------------------------
  22:  
  23: #
  24:  
  25: # 集群名称:
  26:  
  27: #
  28:  
  29: cluster.name: mycluster
  30:  
  31: #
  32:  
  33: # ------------------------------------ 节点 ------------------------------------
  34:  
  35: #
  36:  
  37: # 节点名称:
  38:  
  39: #
  40:  
  41: node.name: es-01
  42:  
  43: node.master: true
  44:  
  45: node.data: true
  46:  
  47: #
  48:  
  49: # 为节点添加自定义属性,如机架:
  50:  
  51: #
  52:  
  53: # node.rack: r1
  54:  
  55: #
  56:  
  57: # ----------------------------------- 路径 ------------------------------------
  58:  
  59: #
  60:  
  61: # 存放数据的目录 (多个目录用逗号分隔):
  62:  
  63: #
  64:  
  65: # path.data: /path/to/data
  66:  
  67: #
  68:  
  69: # 日志文件目录:
  70:  
  71: #
  72:  
  73: # path.logs: /path/to/logs
  74:  
  75: #
  76:  
  77: # ----------------------------------- 内存 -----------------------------------
  78:  
  79: #
  80:  
  81: # 启动时锁定内存:
  82:  
  83: #
  84:  
  85: # bootstrap.mlockall: true
  86:  
  87: #
  88:  
  89: # 确保设置了 `ES_HEAP_SIZE` 环境变量, 大小为系统内存的一半,
  90:  
  91: # 该值为线程可以使用的最大内存
  92:  
  93: #
  94:  
  95: # 当系统正在交换内存时, Elasticsearch 执行性能会很差.
  96:  
  97: #
  98:  
  99: # ---------------------------------- 网络 -----------------------------------
 100:  
 101: #
 102:  
 103: # 设置绑定地址到指定IP (IPv4 or IPv6):
 104:  
 105: #
 106:  
 107: network.host: 172.16.50.137
 108:  
 109: #
 110:  
 111: # 设置自定义 HTTP 端口:
 112:  
 113: #
 114:  
 115: http.port: 9200
 116:  
 117: transport.tcp.port: 9300
 118:  
 119: # http.cors.allow-origin: "*"
 120:  
 121: # http.cors.enabled: true
 122:  
 123: #
 124:  
 125: # 更多信息, 参见如下链接:
 126:  
 127: # <http://www.elastic.co/guide/en/elasticsearch/reference/current/modules-network.html>
 128:  
 129: #
 130:  
 131: # --------------------------------- 节点发现 ----------------------------------
 132:  
 133: #
 134:  
 135: # 当新节点加入时,传递一个主机的初始化列表以完成节点发现:
 136:  
 137: # 默认主机列表为 ["127.0.0.1", "[::1]"]
 138:  
 139: #
 140:  
 141: # discovery.zen.ping.unicast.hosts: ["host1", "host2"]
 142:  
 143:  
 144:  
 145: #
 146:  
 147: # 通过配置大多数节点阻止脑裂现象 (数量: 节点总数量 / 2 + 1):
 148:  
 149: #
 150:  
 151: # discovery.zen.minimum_master_nodes: 2
 152:  
 153: #
 154:  
 155: # 更多信息, 参见如下链接:
 156:  
 157: # <http://www.elastic.co/guide/en/elasticsearch/reference/current/modules-discovery.html>
 158:  
 159: #
 160:  
 161: # ---------------------------------- 网关 -----------------------------------
 162:  
 163: #
 164:  
 165: # 当整个集群重新启动后, 只有 N 个节点启动了, 集群才会恢复,否则将阻塞:
 166:  
 167: #
 168:  
 169: # gateway.recover_after_nodes: 2
 170:  
 171: #
 172:  
 173: # 更多信息, 参见如下链接:
 174:  
 175: # <http://www.elastic.co/guide/en/elasticsearch/reference/current/modules-gateway.html>
 176:  
 177: #
 178:  
 179: # ---------------------------------- 其他 -----------------------------------
 180:  
 181: #
 182:  
 183: # 禁止在一个系统上启动多个节点:
 184:  
 185: #
 186:  
 187: # node.max_local_storage_nodes: 1
 188:  
 189: #
 190:  
 191: # Require explicit names when deleting indices:
 192:  
 193: #
 194:  
 195: # action.destructive_requires_name: true
 196:  
 197:  
 198:  
 199: index:
 200:  
 201:   analysis:
 202:  
 203:     tokenizer:
 204:  
 205:       my_pinyin:
 206:  
 207:         type: pinyin
 208:  
 209:         first_letter: prefix
 210:  
 211:         padding_char: ‘‘
 212:  
 213:       pinyin_first_letter:
 214:  
 215:         type: pinyin
 216:  
 217:         first_letter: only
 218:  
 219:       mmseg_maxword:
 220:  
 221:         type: mmseg
 222:  
 223:         seg_type: max_word
 224:  
 225:       mmseg_complex:
 226:  
 227:         type: mmseg
 228:  
 229:         seg_type: complex
 230:  
 231:       mmseg_simple:
 232:  
 233:         type: mmseg
 234:  
 235:         seg_type: simple
 236:  
 237:       semicolon_spliter:
 238:  
 239:         type: pattern
 240:  
 241:         pattern: ";"
 242:  
 243:       pct_spliter:
 244:  
 245:         type: pattern
 246:  
 247:         pattern: "[%]+"
 248:  
 249:       ngram_1_to_2:
 250:  
 251:         type: nGram
 252:  
 253:         min_gram: 1
 254:  
 255:         max_gram: 2
 256:  
 257:       ngram_1_to_3:
 258:  
 259:         type: nGram
 260:  
 261:         min_gram: 1
 262:  
 263:         max_gram: 3
 264:  
 265:     filter:
 266:  
 267:       ngram_min_3:
 268:  
 269:         max_gram: 10
 270:  
 271:         min_gram: 3
 272:  
 273:         type: nGram
 274:  
 275:       ngram_min_2:
 276:  
 277:         max_gram: 10
 278:  
 279:         min_gram: 2
 280:  
 281:         type: nGram
 282:  
 283:       ngram_min_1:
 284:  
 285:         max_gram: 10
 286:  
 287:         min_gram: 1
 288:  
 289:         type: nGram
 290:  
 291:       min2_length:
 292:  
 293:         min: 2
 294:  
 295:         max: 4
 296:  
 297:         type: length
 298:  
 299:       min3_length:
 300:  
 301:         min: 3
 302:  
 303:         max: 4
 304:  
 305:         type: length
 306:  
 307:       pinyin_first_letter:
 308:  
 309:         type: pinyin
 310:  
 311:         first_letter: only
 312:  
 313:     analyzer:
 314:  
 315:       lowercase_keyword:
 316:  
 317:         type: custom
 318:  
 319:         filter:
 320:  
 321:         - lowercase
 322:  
 323:         tokenizer: standard
 324:  
 325:       lowercase_keyword_ngram_min_size1:
 326:  
 327:         type: custom
 328:  
 329:         filter:
 330:  
 331:         - lowercase
 332:  
 333:         - stop
 334:  
 335:         - trim
 336:  
 337:         - unique
 338:  
 339:         tokenizer: nGram
 340:  
 341:       lowercase_keyword_ngram_min_size2:
 342:  
 343:         type: custom
 344:  
 345:         filter:
 346:  
 347:         - lowercase
 348:  
 349:         - min2_length
 350:  
 351:         - stop
 352:  
 353:         - trim
 354:  
 355:         - unique
 356:  
 357:         tokenizer: nGram
 358:  
 359:       lowercase_keyword_ngram_min_size3:
 360:  
 361:         type: custom
 362:  
 363:         filter:
 364:  
 365:         - lowercase
 366:  
 367:         - min3_length
 368:  
 369:         - stop
 370:  
 371:         - trim
 372:  
 373:         - unique
 374:  
 375:         tokenizer: ngram_1_to_3
 376:  
 377:       lowercase_keyword_ngram:
 378:  
 379:         type: custom
 380:  
 381:         filter:
 382:  
 383:         - lowercase
 384:  
 385:         - stop
 386:  
 387:         - trim
 388:  
 389:         - unique
 390:  
 391:         tokenizer: ngram_1_to_3
 392:  
 393:       lowercase_keyword_without_standard:
 394:  
 395:         type: custom
 396:  
 397:         filter:
 398:  
 399:         - lowercase
 400:  
 401:         tokenizer: keyword
 402:  
 403:       lowercase_whitespace:
 404:  
 405:         type: custom
 406:  
 407:         filter:
 408:  
 409:         - lowercase
 410:  
 411:         tokenizer: whitespace
 412:  
 413:       ik:
 414:  
 415:         alias:
 416:  
 417:         - ik_analyzer
 418:  
 419:         type: ik
 420:  
 421:       ik_max_word:
 422:  
 423:         type: ik
 424:  
 425:         use_smart: true
 426:  
 427:       ik_smart:
 428:  
 429:         type: ik
 430:  
 431:         use_smart: true
 432:  
 433:       mmseg:
 434:  
 435:         alias:
 436:  
 437:         - mmseg_analyzer
 438:  
 439:         type: mmseg
 440:  
 441:       mmseg_maxword:
 442:  
 443:         type: custom
 444:  
 445:         filter:
 446:  
 447:         - lowercase
 448:  
 449:         tokenizer: mmseg_maxword
 450:  
 451:       mmseg_complex:
 452:  
 453:         type: custom
 454:  
 455:         filter:
 456:  
 457:         - lowercase
 458:  
 459:         tokenizer: mmseg_complex
 460:  
 461:       mmseg_simple:
 462:  
 463:         type: custom
 464:  
 465:         filter:
 466:  
 467:         - lowercase
 468:  
 469:         tokenizer: mmseg_simple
 470:  
 471:       comma_spliter:
 472:  
 473:         type: pattern
 474:  
 475:         pattern: "[,|\\s]+"
 476:  
 477:       pct_spliter:
 478:  
 479:         type: pattern
 480:  
 481:         pattern: "[%]+"
 482:  
 483:       custom_snowball_analyzer:
 484:  
 485:         type: snowball
 486:  
 487:         language: English
 488:  
 489:       simple_english_analyzer:
 490:  
 491:         type: custom
 492:  
 493:         tokenizer: whitespace
 494:  
 495:         filter:
 496:  
 497:         - standard
 498:  
 499:         - lowercase
 500:  
 501:         - snowball
 502:  
 503:       edge_ngram:
 504:  
 505:         type: custom
 506:  
 507:         tokenizer: edgeNGram
 508:  
 509:         filter:
 510:  
 511:         - lowercase
 512:  
 513:       pinyin_ngram_analyzer:
 514:  
 515:         type: custom
 516:  
 517:         tokenizer: my_pinyin
 518:  
 519:         filter:
 520:  
 521:         - lowercase
 522:  
 523:         - nGram
 524:  
 525:         - trim
 526:  
 527:         - unique
 528:  
 529:       pinyin_first_letter_analyzer:
 530:  
 531:         type: custom
 532:  
 533:         tokenizer: pinyin_first_letter
 534:  
 535:         filter:
 536:  
 537:         - standard
 538:  
 539:         - lowercase
 540:  
 541:       pinyin_first_letter_keyword_analyzer:
 542:  
 543:         alias:
 544:  
 545:         - pinyin_first_letter_analyzer_keyword
 546:  
 547:         type: custom
 548:  
 549:         tokenizer: keyword
 550:  
 551:         filter:
 552:  
 553:         - pinyin_first_letter
 554:  
 555:         - lowercase
 556:  
 557:       path_analyzer: #used for tokenize :/something/something/else
 558:  
 559:         type: custom
 560:  
 561:         tokenizer: path_hierarchy
 562:  
 563:  
 564:  
 565: #index.analysis.analyzer.default.type: mmseg
 566:  
 567: index.analysis.analyzer.default.type: ik
 568:  
 569:  
 570:  
 571: # rtf.filter.redis.host: 127.0.0.1
 572:  
 573: # rtf.filter.redis.port: 6379

Slave 节点


Slave 节点配置如下。

   1: # ======================== Elasticsearch Configuration =========================
   2:  
   3: #
   4:  
   5: # 注意: Elasticsearch 大多数设置都有默认值.
   6:  
   7: #       在你着手调整和优化配置之前,确保你明白你期望什么,得到什么结果
   8:  
   9: #
  10:  
  11: # 配置一个节点的主要方式就是通过该文件. 该模板列出了大多数重要的设置.
  12:  
  13: #
  14:  
  15: # 更多配置选项参见如下链接:
  16:  
  17: # <http://www.elastic.co/guide/en/elasticsearch/reference/current/setup-configuration.html>
  18:  
  19: #
  20:  
  21: # ---------------------------------- 集群 -----------------------------------
  22:  
  23: #
  24:  
  25: # 集群名称:
  26:  
  27: #
  28:  
  29: cluster.name: mycluster
  30:  
  31: #
  32:  
  33: # ------------------------------------ 节点 ------------------------------------
  34:  
  35: #
  36:  
  37: # 节点名称:
  38:  
  39: #
  40:  
  41: node.name: es-01
  42:  
  43: node.master: true
  44:  
  45: node.data: true
  46:  
  47: #
  48:  
  49: # 为节点添加自定义属性,如机架:
  50:  
  51: #
  52:  
  53: # node.rack: r1
  54:  
  55: #
  56:  
  57: # ----------------------------------- 路径 ------------------------------------
  58:  
  59: #
  60:  
  61: # 存放数据的目录 (多个目录用逗号分隔):
  62:  
  63: #
  64:  
  65: # path.data: /path/to/data
  66:  
  67: #
  68:  
  69: # 日志文件目录:
  70:  
  71: #
  72:  
  73: # path.logs: /path/to/logs
  74:  
  75: #
  76:  
  77: # ----------------------------------- 内存 -----------------------------------
  78:  
  79: #
  80:  
  81: # 启动时锁定内存:
  82:  
  83: #
  84:  
  85: # bootstrap.mlockall: true
  86:  
  87: #
  88:  
  89: # 确保设置了 `ES_HEAP_SIZE` 环境变量, 大小为系统内存的一半,
  90:  
  91: # 该值为线程可以使用的最大内存
  92:  
  93: #
  94:  
  95: # 当系统正在交换内存时, Elasticsearch 执行性能会很差.
  96:  
  97: #
  98:  
  99: # ---------------------------------- 网络 -----------------------------------
 100:  
 101: #
 102:  
 103: # 设置绑定地址到指定IP (IPv4 or IPv6):
 104:  
 105: #
 106:  
 107: network.host: 172.16.50.137
 108:  
 109: #
 110:  
 111: # 设置自定义 HTTP 端口:
 112:  
 113: #
 114:  
 115: http.port: 9200
 116:  
 117: transport.tcp.port: 9300
 118:  
 119: # http.cors.allow-origin: "*"
 120:  
 121: # http.cors.enabled: true
 122:  
 123: #
 124:  
 125: # 更多信息, 参见如下链接:
 126:  
 127: # <http://www.elastic.co/guide/en/elasticsearch/reference/current/modules-network.html>
 128:  
 129: #
 130:  
 131: # --------------------------------- 节点发现 ----------------------------------
 132:  
 133: #
 134:  
 135: # 当新节点加入时,传递一个主机的初始化列表以完成节点发现:
 136:  
 137: # 默认主机列表为 ["127.0.0.1", "[::1]"]
 138:  
 139: #
 140:  
 141: # discovery.zen.ping.unicast.hosts: ["host1", "host2"]
 142:  
 143:  
 144:  
 145: #
 146:  
 147: # 通过配置大多数节点阻止脑裂现象 (数量: 节点总数量 / 2 + 1):
 148:  
 149: #
 150:  
 151: # discovery.zen.minimum_master_nodes: 2
 152:  
 153: #
 154:  
 155: # 更多信息, 参见如下链接:
 156:  
 157: # <http://www.elastic.co/guide/en/elasticsearch/reference/current/modules-discovery.html>
 158:  
 159: #
 160:  
 161: # ---------------------------------- 网关 -----------------------------------
 162:  
 163: #
 164:  
 165: # 当整个集群重新启动后, 只有 N 个节点启动了, 集群才会恢复,否则将阻塞:
 166:  
 167: #
 168:  
 169: # gateway.recover_after_nodes: 2
 170:  
 171: #
 172:  
 173: # 更多信息, 参见如下链接:
 174:  
 175: # <http://www.elastic.co/guide/en/elasticsearch/reference/current/modules-gateway.html>
 176:  
 177: #
 178:  
 179: # ---------------------------------- 其他 -----------------------------------
 180:  
 181: #
 182:  
 183: # 禁止在一个系统上启动多个节点:
 184:  
 185: #
 186:  
 187: # node.max_local_storage_nodes: 1
 188:  
 189: #
 190:  
 191: # Require explicit names when deleting indices:
 192:  
 193: #
 194:  
 195: # action.destructive_requires_name: true
 196:  
 197:  
 198:  
 199: index:
 200:  
 201:   analysis:
 202:  
 203:     tokenizer:
 204:  
 205:       my_pinyin:
 206:  
 207:         type: pinyin
 208:  
 209:         first_letter: prefix
 210:  
 211:         padding_char: ‘‘
 212:  
 213:       pinyin_first_letter:
 214:  
 215:         type: pinyin
 216:  
 217:         first_letter: only
 218:  
 219:       mmseg_maxword:
 220:  
 221:         type: mmseg
 222:  
 223:         seg_type: max_word
 224:  
 225:       mmseg_complex:
 226:  
 227:         type: mmseg
 228:  
 229:         seg_type: complex
 230:  
 231:       mmseg_simple:
 232:  
 233:         type: mmseg
 234:  
 235:         seg_type: simple
 236:  
 237:       semicolon_spliter:
 238:  
 239:         type: pattern
 240:  
 241:         pattern: ";"
 242:  
 243:       pct_spliter:
 244:  
 245:         type: pattern
 246:  
 247:         pattern: "[%]+"
 248:  
 249:       ngram_1_to_2:
 250:  
 251:         type: nGram
 252:  
 253:         min_gram: 1
 254:  
 255:         max_gram: 2
 256:  
 257:       ngram_1_to_3:
 258:  
 259:         type: nGram
 260:  
 261:         min_gram: 1
 262:  
 263:         max_gram: 3
 264:  
 265:     filter:
 266:  
 267:       ngram_min_3:
 268:  
 269:         max_gram: 10
 270:  
 271:         min_gram: 3
 272:  
 273:         type: nGram
 274:  
 275:       ngram_min_2:
 276:  
 277:         max_gram: 10
 278:  
 279:         min_gram: 2
 280:  
 281:         type: nGram
 282:  
 283:       ngram_min_1:
 284:  
 285:         max_gram: 10
 286:  
 287:         min_gram: 1
 288:  
 289:         type: nGram
 290:  
 291:       min2_length:
 292:  
 293:         min: 2
 294:  
 295:         max: 4
 296:  
 297:         type: length
 298:  
 299:       min3_length:
 300:  
 301:         min: 3
 302:  
 303:         max: 4
 304:  
 305:         type: length
 306:  
 307:       pinyin_first_letter:
 308:  
 309:         type: pinyin
 310:  
 311:         first_letter: only
 312:  
 313:     analyzer:
 314:  
 315:       lowercase_keyword:
 316:  
 317:         type: custom
 318:  
 319:         filter:
 320:  
 321:         - lowercase
 322:  
 323:         tokenizer: standard
 324:  
 325:       lowercase_keyword_ngram_min_size1:
 326:  
 327:         type: custom
 328:  
 329:         filter:
 330:  
 331:         - lowercase
 332:  
 333:         - stop
 334:  
 335:         - trim
 336:  
 337:         - unique
 338:  
 339:         tokenizer: nGram
 340:  
 341:       lowercase_keyword_ngram_min_size2:
 342:  
 343:         type: custom
 344:  
 345:         filter:
 346:  
 347:         - lowercase
 348:  
 349:         - min2_length
 350:  
 351:         - stop
 352:  
 353:         - trim
 354:  
 355:         - unique
 356:  
 357:         tokenizer: nGram
 358:  
 359:       lowercase_keyword_ngram_min_size3:
 360:  
 361:         type: custom
 362:  
 363:         filter:
 364:  
 365:         - lowercase
 366:  
 367:         - min3_length
 368:  
 369:         - stop
 370:  
 371:         - trim
 372:  
 373:         - unique
 374:  
 375:         tokenizer: ngram_1_to_3
 376:  
 377:       lowercase_keyword_ngram:
 378:  
 379:         type: custom
 380:  
 381:         filter:
 382:  
 383:         - lowercase
 384:  
 385:         - stop
 386:  
 387:         - trim
 388:  
 389:         - unique
 390:  
 391:         tokenizer: ngram_1_to_3
 392:  
 393:       lowercase_keyword_without_standard:
 394:  
 395:         type: custom
 396:  
 397:         filter:
 398:  
 399:         - lowercase
 400:  
 401:         tokenizer: keyword
 402:  
 403:       lowercase_whitespace:
 404:  
 405:         type: custom
 406:  
 407:         filter:
 408:  
 409:         - lowercase
 410:  
 411:         tokenizer: whitespace
 412:  
 413:       ik:
 414:  
 415:         alias:
 416:  
 417:         - ik_analyzer
 418:  
 419:         type: ik
 420:  
 421:       ik_max_word:
 422:  
 423:         type: ik
 424:  
 425:         use_smart: true
 426:  
 427:       ik_smart:
 428:  
 429:         type: ik
 430:  
 431:         use_smart: true
 432:  
 433:       mmseg:
 434:  
 435:         alias:
 436:  
 437:         - mmseg_analyzer
 438:  
 439:         type: mmseg
 440:  
 441:       mmseg_maxword:
 442:  
 443:         type: custom
 444:  
 445:         filter:
 446:  
 447:         - lowercase
 448:  
 449:         tokenizer: mmseg_maxword
 450:  
 451:       mmseg_complex:
 452:  
 453:         type: custom
 454:  
 455:         filter:
 456:  
 457:         - lowercase
 458:  
 459:         tokenizer: mmseg_complex
 460:  
 461:       mmseg_simple:
 462:  
 463:         type: custom
 464:  
 465:         filter:
 466:  
 467:         - lowercase
 468:  
 469:         tokenizer: mmseg_simple
 470:  
 471:       comma_spliter:
 472:  
 473:         type: pattern
 474:  
 475:         pattern: "[,|\\s]+"
 476:  
 477:       pct_spliter:
 478:  
 479:         type: pattern
 480:  
 481:         pattern: "[%]+"
 482:  
 483:       custom_snowball_analyzer:
 484:  
 485:         type: snowball
 486:  
 487:         language: English
 488:  
 489:       simple_english_analyzer:
 490:  
 491:         type: custom
 492:  
 493:         tokenizer: whitespace
 494:  
 495:         filter:
 496:  
 497:         - standard
 498:  
 499:         - lowercase
 500:  
 501:         - snowball
 502:  
 503:       edge_ngram:
 504:  
 505:         type: custom
 506:  
 507:         tokenizer: edgeNGram
 508:  
 509:         filter:
 510:  
 511:         - lowercase
 512:  
 513:       pinyin_ngram_analyzer:
 514:  
 515:         type: custom
 516:  
 517:         tokenizer: my_pinyin
 518:  
 519:         filter:
 520:  
 521:         - lowercase
 522:  
 523:         - nGram
 524:  
 525:         - trim
 526:  
 527:         - unique
 528:  
 529:       pinyin_first_letter_analyzer:
 530:  
 531:         type: custom
 532:  
 533:         tokenizer: pinyin_first_letter
 534:  
 535:         filter:
 536:  
 537:         - standard
 538:  
 539:         - lowercase
 540:  
 541:       pinyin_first_letter_keyword_analyzer:
 542:  
 543:         alias:
 544:  
 545:         - pinyin_first_letter_analyzer_keyword
 546:  
 547:         type: custom
 548:  
 549:         tokenizer: keyword
 550:  
 551:         filter:
 552:  
 553:         - pinyin_first_letter
 554:  
 555:         - lowercase
 556:  
 557:       path_analyzer: #used for tokenize :/something/something/else
 558:  
 559:         type: custom
 560:  
 561:         tokenizer: path_hierarchy
 562:  
 563:  
 564:  
 565: #index.analysis.analyzer.default.type: mmseg
 566:  
 567: index.analysis.analyzer.default.type: ik
 568:  
 569:  
 570:  
 571: # rtf.filter.redis.host: 127.0.0.1
 572:  
 573: # rtf.filter.redis.port: 6379
时间: 2024-10-16 22:36:44

Elasticsearch 搭建集群经验的相关文章

elasticsearch 搭建-集群-java应用

搭建 首先下载最新的elasticsearch安装版本: elasticsearch下载. 下载最新的elasticsearch 0.90.1版本.下载完成后.解压缩在安装目录. 在cmd命令行进入安装目录,再进入 bin目录,运行elasticsearch.bat命令: 启动成功后.在浏览器中输入:http://localhost:9200/ 1 2 3 4 5 6 7 8 9 10 { "ok" : true, "status" : 200, "nam

ELK介绍及搭建 Elasticsearch 分布式集群

笔记内容:ELK介绍及搭建 Elasticsearch 分布式集群笔记日期:2018-03-02 27.1 ELK介绍 27.2 ELK安装准备工作 27.3 安装es 27.4 配置es 27.5 curl查看es集群情况 ELK介绍 需求背景: 业务发展越来越庞大,服务器越来越多 各种访问日志.应用日志.错误日志量越来越多,导致运维人员无法很好的去管理日志 开发人员排查问题,需要到服务器上查日志,不方便 运营人员需要一些数据,需要我们运维到服务器上分析日志 为什么要用到ELK: 一般我们需要

关于elasticsearch安装及搭建集群时候的错误

1,在Windows上解压后启动elasticsearch后可能cmd中会抛出java 无法初始话异常,网上查询必须用的是jdk1.8以上,可是本人用的 就是jdk1.8啊,半天解决无果,最后重新安装新的jdk为1.8.1_9_1,重新启动es成功. 2,在搭建es集群时出现,当启动slave节点时出现,slave failed send join......等,无法链接,原来是原先搭建集群的数据没有清掉,直接把slave中的date文件夹中的一个文件夹删除重新启动就好了! 原文地址:https

sentinel搭建redis集群经验总结

一.protected-mode默认情况下,redis node和sentinel的protected-mode都是yes,在搭建集群时,若想从远程连接redis集群,需要将redis node和sentinel的protected-mode修改为no,若只修改redis node,从远程连接sentinel后,依然是无法正常使用的,且sentinel的配置文件中没有protected-mode配置项,需要手工添加.依据redis文档的说明,若protected-mode设置为no后,需要增加密

架构之路:nginx与IIS服务器搭建集群实现负载均衡(三)

参考网址:https://blog.csdn.net/zhanghan18333611647/article/details/50811980 [前言] 在<架构之路:nginx与IIS服务器搭建集群实现负载均衡(二)>中提到有好多有趣的地方,接下来就为大家一块儿讲讲在深入研究过程中遇到那些有趣的事情. ·实战之行--发现问题 ·探索之旅--寻出问题原因 ·解决之道--解决问题 [实战之行] 在<架构之路:nginx与IIS服务器搭建集群实现负载均衡(二)>中做了小Demo,当时做

使用LVS+DR搭建集群实现负载均衡

使用LVS+DR搭建集群实现负载均衡 DR模式的概述与工作原理 DR模式服务概述:        Direct Routing(直接路由) --在同一个地域,同一个网段 Director分配请求到不同的real server.real server处理请求后直接回应给用户,这样director负载均衡器仅处理客户机与服务器的一半连接.负载均衡器仅处理一半的连接,避免了新的性能瓶颈,同样增加了系统的可伸缩性.Direct Routing由与采用物理层(修改MAC地址)技术,因此所有服务器都必须在一

复制虚拟机vmware centos搭建集群节点过程中网络配置eth0和eth1遇到的问题以及NAT模式下虚拟机静态IP配置方法

在centos中安装完第一个虚拟机后,一般习惯通过克隆的方式创建其它虚拟机,开后vmware无法发现网卡信息,系统认为这是重新安装,所以重新创建了一个新的网卡叫eth1. 并且用IFCONFIG-a查看网卡信息,只有lo信息,无法显示eth0了. 解决方法: 修改/etc/udev/rules.d 下的 70-persistent-net.rules文件,我们会发现下面两行: # PCI device 0x1022:0x2000(pcnet32) SUBSYSTEM=="net",DR

redis 一二事 - 搭建集群缓存服务器

在如今并发的环境下,对大数据量的查询采用缓存是最好不过的了,本文使用redis搭建集群 (个人喜欢redis,对memcache不感冒) redis是3.0后增加的集群功能,非常强大 集群中应该至少有三个节点,每个节点有一备份节点.这样算下来至少需要6台服务器 考虑到有些朋友的电脑配置不是很高,跑多个虚拟机就会卡,这边放出伪分布式和分布式 (2年前的配置) 前提先装好一个单例情况下的redis(这里就不多说了) 需要6个redis实例 搭建集群的步骤: 在/usr/local下 创建文件夹 这个

搭建集群平台

******************* 搭建集群结点 ***************** # vim /etc/yum.repos.d/rhel-source.repo 安装服务: # yum install -y ricci   (两个结点上都安装) # passwd ricci # /etc/init.d/ricci start # chkconfig ricci on#开机自启动 # yum install -y luci   (在server1上安装) # /etc/init.d/luc