用于在Amazon Elasticsearch集群中搜索概念的API服务。
注意:AWS SDK for Go目前不包含对ES数据平面API的支持,但自v1.2.0版本起已暴露签名器(Signer)。
访问AES(Amazon Elasticsearch Service)的实现方式:
适用于需要从Amazon Elasticsearch集群中检索概念数据的应用场景,如内容管理系统、知识图谱查询、自动补全功能等。
确保本地已安装dep工具,如未安装,执行以下命令:
bashcurl [***] | sh
bashmkdir $GOPATH/src/github.com/Financial-Times/concept-search-api cd $GOPATH/src/github.com/concept-search-api git clone [***] cd concept-search-api && dep ensure -vendor-only go build ./concept-search-api --aws-access-key="{access key}" --aws-secret-access-key="{secret key}"
可通过命令行参数配置服务,支持以下参数(未指定时使用默认值):
aws-access-key:AWS访问密钥(必填)aws-secret-access-key:AWS密钥(必填)elasticsearch-endpoint:Elasticsearch端点elasticsearch-region:Elasticsearch区域port:服务运行端口(默认:8080)index-name:搜索索引名(默认:concept)elasticsearch-index:Elasticsearch索引(默认:concept)search-result-limit:最大返回结果数(默认:50)elasticsearch-trace:是否启用ES跟踪(默认:false)需本地运行Elasticsearch实例,并设置环境变量:
bashexport ELASTICSEARCH_TEST_URL=http://localhost:9200
执行测试命令:
bashgo test -race ./...
使用-short选项跳过集成测试:
bashgo test -race -short ./...
用于搜索概念,请求体为包含term字段的JSON,term值为搜索条件。
搜索"FOO":
bashcurl -XPOST {concept-search-api-url}/concept/search -d '{"term":"FOO"}'
include_score=true:返回结果中包含匹配分数
bashcurl -XPOST {concept-search-api-url}/concept/search?include_score=true -d '{"term":"FOO"}'
searchAllAuthorities=true:扩展搜索域至所有权威来源(TME、Smartlogic、Factset等)
bashcurl -XPOST {concept-search-api-url}/concept/search?searchAllAuthorities=true -d '{"term":"FOO"}'
include_deprecated=true:包含已弃用的概念
bashcurl -XPOST {concept-search-api-url}/concept/search?include_deprecated=true -d '{"term":"FOO"}'
json[ { "id": "[***]", "apiUrl": "[***]", "prefLabel": "FOO LLC", "types": [ "[***]", "[***]", "[***]" ], "directType": "[***]", "aliases": ["FOO LLC", "FOO"], "score": 10.***, "isDeprecated": true }, { "id": "[***]", "apiUrl": "[***]", "prefLabel": "FOO International", "types": [ "[***]", "[***]", "[***]" ], "directType": "[***]", "aliases": ["FOO International", "FOO INTERNATIONAL"], "score": 2.8585405 } ]
用于类型提前(typeahead)风格的概念查询,type参数为必填项。
bashcurl {concept-search-api-url}/concepts?type=[***]
mode=search:激活搜索模式,需配合q参数指定搜索词
bashcurl {concept-search-api-url}/concepts?type=[***]
boost=authors:在搜索模式下提升作者相关结果(仅支持作者类型)
bashcurl {concept-search-api-url}/concepts?type=[***]
searchAllAuthorities=true:扩展搜索域至所有权威来源include_deprecated=true:包含已弃用的概念返回标准FT格式的服务连通性和集群健康状态。
返回ES集群的详细健康状态,格式与{elasticsearch-endpoint}/_cluster/health一致。服务不可用时返回503。
服务健康时返回200,不健康时返回503(服务不可用)。
更多详情请参见Swagger YML。

来自真实用户的反馈,见证轩辕镜像的优质服务
免费版仅支持 Docker Hub 加速,不承诺可用性和速度;专业版支持更多镜像源,保证可用性和稳定速度,提供优先客服响应。
免费版仅支持 docker.io;专业版支持 docker.io、gcr.io、ghcr.io、registry.k8s.io、nvcr.io、quay.io、mcr.microsoft.com、docker.elastic.co 等。
当返回 402 Payment Required 错误时,表示流量已耗尽,需要充值流量包以恢复服务。
通常由 Docker 版本过低导致,需要升级到 20.x 或更高版本以支持 V2 协议。
先检查 Docker 版本,版本过低则升级;版本正常则验证镜像信息是否正确。
使用 docker tag 命令为镜像打上新标签,去掉域名前缀,使镜像名称更简洁。
探索更多轩辕镜像的使用方法,找到最适合您系统的配置方式
通过 Docker 登录认证访问私有仓库
在 Linux 系统配置镜像加速服务
在 Docker Desktop 配置镜像加速
Docker Compose 项目配置加速
Kubernetes 集群配置 Containerd
在宝塔面板一键配置镜像加速
Synology 群晖 NAS 配置加速
飞牛 fnOS 系统配置镜像加速
极空间 NAS 系统配置加速服务
爱快 iKuai 路由系统配置加速
绿联 NAS 系统配置镜像加速
QNAP 威联通 NAS 配置加速
Podman 容器引擎配置加速
HPC 科学计算容器配置加速
ghcr、Quay、nvcr 等镜像仓库
无需登录使用专属域名加速
需要其他帮助?请查看我们的 常见问题 或 官方QQ群: 13763429