Skip to content

8.18 ansj_config 返回格式问题 #247

@ChrisLKennedy

Description

@ChrisLKennedy

在 ansj.cfg.yml 配置了
ansj_config: http://192.168.10.12:9018/api/config

之前使用的是es7,接口返回的数据格式为旧版的properties 格式key=value 如下:
isRealName=true
isNameRecognition=true
isNumRecognition=true
isQuantifierRecognition=true
dic_model=http://192.168.10.12:9018/api/dict?type=DIC&dictId=1234

目前想要升级ES8.18,请问这种格式插件支持读取吗? 是不是必须要转成yml的格式?

另外在es8启动的时候,报了一个警告,看内容是没有/usr/share/elasticsearch读取权限,Elasticsearch 8.x 新引入的 “Entitlement” 安全沙箱机制 把 ansj 插件的文件读取操作拦住了。不知道需要怎么处理?
2025-08-15 15:00:19 {"@timestamp":"2025-08-15T07:00:19.908Z", "log.level": "WARN", "message":"Not entitled: component [elasticsearch-analysis-ansj], module [ALL-UNNAMED], class [class org.nlpcn.commons.lang.util.FileFinder], entitlement [file], operation [read], path [/usr/share/elasticsearch]", "ecs.version": "1.2.0","service.name":"ES_ECS","event.dataset":"elasticsearch.server","process.thread.name":"main","log.logger":"org.elasticsearch.entitlement.runtime.policy.PolicyManager.elasticsearch-analysis-ansj.ALL-UNNAMED","elasticsearch.node.name":"50bb9a3c1dd4","elasticsearch.cluster.name":"docker-cluster","error.type":"org.elasticsearch.entitlement.runtime.api.NotEntitledException","error.message":"component [elasticsearch-analysis-ansj], module [ALL-UNNAMED], class [class org.nlpcn.commons.lang.util.FileFinder], entitlement [file], operation [read], path [/usr/share/elasticsearch]","error.stack_trace":"org.elasticsearch.entitlement.runtime.api.NotEntitledException: component [elasticsearch-analysis-ansj], module [ALL-UNNAMED], class [class org.nlpcn.commons.lang.util.FileFinder], entitlement [file], operation [read], path [/usr/share/elasticsearch]

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions