【问题标题】:django-haystack elasticsearch as backend and searchenginedjango-haystack elasticsearch 作为后端和搜索引擎
【发布时间】:2023-03-06 07:40:02
【问题描述】:

是否可以不定义另一个数据库作为后端使用弹性搜索作为数据库和搜索引擎在大多数教程中,另一个数据库后端由弹性搜索索引。但我想使用elasticsearch作为主数据库和搜索引擎。您有任何配置示例或想法吗?

【问题讨论】:

标签: python django elasticsearch django-haystack


【解决方案1】:

我使用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所示

【讨论】:

    猜你喜欢
    • 2023-03-31
    • 1970-01-01
    • 1970-01-01
    • 2012-03-21
    • 2011-03-10
    • 2015-09-21
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多