Swiftype Enterprise搜索的弃用API客户端。请使用elastic_enterprise_search代替。
项目描述
⚠️ 此客户端已弃用 ⚠️
swiftype_enterprise 已被 elastic_enterprise_search 替代。谢谢! - Elastic
是Elastic Enterprise Search的官方Python客户端。
内容
入门 🐣
支持Python 2.7和Python 3.3+。
使用pip <http://pypi.python.org/pypi/pip>
安装
$ python -m pip install swiftype_enterprise
您还可以下载并安装项目源代码
$ python setup.py install
用法
创建内容源后,检索您的访问令牌和内容源密钥。
将文档索引到自定义内容源
from swiftype_enterprise import SwiftypeEnterpriseClient
content_source_key = 'content source key'
authorization_token = 'authorization token'
client = SwiftypeEnterpriseClient(authorization_token)
documents = [
{
'id': '1234',
'url': 'https://github.com/swiftype/swiftype-enterprise-python',
'title': 'Swiftype Enterprise Python Github',
'body': 'A descriptive body, with document contents and metadata'
}
]
document_results = client.index_documents(content_source_key, documents, timeout=10, delay=2)
print(document_results)
更改API端点
client = SwiftypeEnterpriseClient(authorization_token, "https://your-server.example.com/api/v1/ent")
常见问题解答 🔮
我在哪里报告客户端的问题?
如果某些功能未按预期工作,请打开问题。
贡献 🚀
我们欢迎对项目做出贡献。在您开始之前,请注意以下几点...
- 在打开拉取请求之前,请创建一个问题来讨论您提案的范围。
- 在适当的情况下,请编写简洁的代码和文档。
许可证 📗
感谢所有贡献者!
项目详情
关闭
swiftype_enterprise-1.0.1.tar.gz的哈希
算法 | 哈希摘要 | |
---|---|---|
SHA256 | a7c2346246a515e7167cc5e788af48995e9772d0c01bea8d388d3f8ba3457bb1 |
|
MD5 | e05bf2a4da595308515a84c3865505b1 |
|
BLAKE2b-256 | c3f8f5b50c3351801fe34a9495485e96e94782fcd80319fa903d9fed7f6d576c |