环境变量中的haystack配置
dj-haystack-url的Python项目详细描述
环境变量中的Haystack配置
- 自由软件:麻省理工学院许可证
支持的后端
目前支持简单、WHOSH、弹性搜索、SOLR和XAPIAN 后端。
安装
安装很简单:
$ pip install dj-haystack-url
用法
在settings.py中配置haystack连接 HAYSTACK_CONNECTIONS(default是可选的):
HAYSTACK_CONNECTIONS = {'default': dj_haystack_url.config(default='simple')}
解析任意haystack连接url:
HAYSTACK_CONNECTIONS = {'default': dj_haystack_url.parse('simple')}
URL架构
Engine | Haystack Backend | URL |
---|---|---|
Simple | ^{tt4}$ | ^{tt5}$ |
Whoosh | ^{tt6}$ | ^{tt7}$ [1] |
Elasticsearch | ^{tt8}$ | ^{tt9}$ |
Solr | ^{tt10}$ | ^{tt11}$ |
Xapian | ^{tt12}$ | ^{tt13}$ [1] |
[1] | (1, 2) Whoosh and Xapian connect to an index on the file system. The same URL format is used, omitting the hostname, and using the “file” portion as the file path to the index. |
历史记录
0.1.0(2014-01-11)
- pypi上的第一个版本。