Giter Site home page Giter Site logo

Comments (8)

ansjsun avatar ansjsun commented on June 3, 2024

应该是配置的问题

如果你想把ansj作为你的默认分词需要在elasticsearch.yml加入如下配置:

····

#默认分词器,索引
index.analysis.analyzer.default.type: index_ansj

#默认分词器,查询

index.analysis.analyzer.default_search.type: query_ansj

····

如果通过mapping来设置。。那么什么都不要配置。。就可以

from elasticsearch-analysis-ansj.

ansjsun avatar ansjsun commented on June 3, 2024

你好这个错误还存在嘛?

from elasticsearch-analysis-ansj.

jonnyzheng avatar jonnyzheng commented on June 3, 2024

@ansjsun 我测试过了,只写默认分词器的时候才可以,如果加了自定义analyzer的话那么就会出错误,我简单配置的也不行:

index:
  analysis:
    analyzer:
      customer_ansj_index:
        tokenizer: index_ansj
      customer_ansj_query:
        tokenizer: query_ansj

本来我想加一些同义词和停用词的

from elasticsearch-analysis-ansj.

ansjsun avatar ansjsun commented on June 3, 2024

哦。。

index:
  analysis:
    analyzer:
      customer_ansj_index:
        tokenizer: index_ansj
      customer_ansj_query:
        tokenizer: query_ansj

这种配置除了加 同义词和停用词。其他情况下应该应该也用不到吧。。具体为什么我也不知道。。。

from elasticsearch-analysis-ansj.

jonnyzheng avatar jonnyzheng commented on June 3, 2024

恩恩,好吧,我再多试试吧,不行就不升级了

from elasticsearch-analysis-ansj.

ansjsun avatar ansjsun commented on June 3, 2024

我觉得时es语法改了吧。。分词插件是按照官方例子来实现的。其它分词器应该也不可以这么配置了

from elasticsearch-analysis-ansj.

jonnyzheng avatar jonnyzheng commented on June 3, 2024

@ansjsun 好的,我再去看看2.3.1的文档

from elasticsearch-analysis-ansj.

ansjsun avatar ansjsun commented on June 3, 2024

@jonnyzheng 不好意思应该是我的错.你把插件删除重新安装下.这次好了

from elasticsearch-analysis-ansj.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.