---
title: "Elasticsearch改变默认的分词器"
author: "maxrocray"
date: "2013-01-08T15:46:29Z"
tags: []
categories: ["开源软件"]
slug: "elasticsearch"
draft: false
lastmod: "2013-01-08T15:46:29Z"
id: 1766295
url: "https://maxrocray.iteye.com/blog/1766295"
---

ES默认的分词器为standard， 想要改变这个， 可以设置成自定义的analyzer.

 

例，想要改变成配置好的ik分词器， 在config/elasticsearch.yml文件中添加如下配置即可：

 

index.analysis.analyzer.default.type:ik  

 

前提当然是你已经安装了ik分词。