Q:非洲食人族的酋长吃什么?

想了解下elasticsearch-hanlp是怎么创建和应用的?麻烦哪位大神指导下

Elasticsearch | 作者 xiaoyuan | 发布于2019年08月16日 | 阅读数:1467

PUT testhanlp
{
  "mappings": {
    "properties":{
      "name":{
        "type":"text",
        "analyzer":"hanlp-index",
        "search_analyzer":"hanlp-index"
      }
    }
  }
}
 
在kebana上这样写报错:
{
  "error": {
    "root_cause": [
      {
        "type": "mapper_parsing_exception",
        "reason": "analyzer [hanlp-index] not found for field [name]"
      }
    ],
    "type": "mapper_parsing_exception",
    "reason": "Failed to parse mapping [_doc]: analyzer [hanlp-index] not found for field [name]",
    "caused_by": {
      "type": "mapper_parsing_exception",
      "reason": "analyzer [hanlp-index] not found for field [name]"
    }
  },
  "status": 400
}
已邀请:

xiaoyuan - 80it男

赞同来自:

GET /_analyze?pretty=true 

"analyzer": "hanlp-index", 
"text":"张柏芝士蛋糕店" 
}
 
这样想就报不同的错误:
{
  "error": {
    "root_cause": [
      {
        "type": "remote_transport_exception",
        "reason": "[AS10-0829-160][127.0.0.1:9300][indices:admin/analyze[s]]"
      }
    ],
    "type": "illegal_argument_exception",
    "reason": "failed to find global analyzer [hanlp-index]"
  },
  "status": 400
}

bellengao - 博客: https://www.jianshu.com/u/e0088e3e2127

赞同来自:

插件没装上?

要回复问题请先登录注册