django-postgresql-zh-full-text-search
Project description
django-postgresql环境下的中文全文检索, 基于倒排索引计算词向量相关度. 未检索到结果会使用原始orm统计关键词频数来进行相关度排序.
QuickStart
# models.py
from pgZhSearch import BaseFullTextSearchModel
class Question(BaseFullTextSearchModel):
# 综合检索设置
search_field_conf = {
'wen_ti': 'A',
'fen_lei_ming': 'B',
'da_an_nei_rong': 'C',
}
class Meta:
indexes = BaseFullTextSearchModel.Meta.indexes
fen_lei_ming = models.TextField(blank=True, null=True, verbose_name='分类名')
wen_ti = models.TextField(blank=True, null=True, verbose_name='问题')
da_an_nei_rong = models.TextField(blank=True, null=True, verbose_name='答案内容')
参考文献
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
pgZhSearch-0.0.1.tar.gz
(10.6 kB
view details)
Built Distribution
File details
Details for the file pgZhSearch-0.0.1.tar.gz
.
File metadata
- Download URL: pgZhSearch-0.0.1.tar.gz
- Upload date:
- Size: 10.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.6.0 importlib_metadata/4.8.2 pkginfo/1.8.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.6.12
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 7daa686a314291a6d16b4d495f57bb7160ad575bb703e8f0b5d6df678e1864c1 |
|
MD5 | 877677b4ca93815cbd75f84e1305cdf5 |
|
BLAKE2b-256 | d2db769f44992759229e95bd099d60dfafc968ff2ac2c52e85a7b6686b2d4062 |
File details
Details for the file pgZhSearch-0.0.1-py3-none-any.whl
.
File metadata
- Download URL: pgZhSearch-0.0.1-py3-none-any.whl
- Upload date:
- Size: 13.6 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.6.0 importlib_metadata/4.8.2 pkginfo/1.8.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.6.12
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 8cbb45166bb24bf106ef5b48fb9a97b141abe4954812c83386725f9b54708208 |
|
MD5 | 6bbca283a355b2b31d8353d34f88c79f |
|
BLAKE2b-256 | ec21f84518cc55e30c17acabe3ff8b66f62477a18e74ab77c170d3da58c26eff |