【发布时间】:2023-03-06 07:40:02
【问题描述】:
是否可以不定义另一个数据库作为后端使用弹性搜索作为数据库和搜索引擎在大多数教程中,另一个数据库后端由弹性搜索索引。但我想使用elasticsearch作为主数据库和搜索引擎。您有任何配置示例或想法吗?
【问题讨论】:
标签: python django elasticsearch django-haystack
是否可以不定义另一个数据库作为后端使用弹性搜索作为数据库和搜索引擎在大多数教程中,另一个数据库后端由弹性搜索索引。但我想使用elasticsearch作为主数据库和搜索引擎。您有任何配置示例或想法吗?
【问题讨论】:
标签: python django elasticsearch django-haystack
我使用https://github.com/aparo/pyes 库解决了。
示例输入:
>>> conn.index({"name":"Joe Tester", "parsedtext":"Joe Testere nice guy", "uuid":"11111", "position":1}, "test-index", "test-type", 1)
如http://pyes.readthedocs.org/en/latest/manual/queries.html所示
【讨论】: