项目架构:
下面是我创建的文章架构。在
class ArticleSchema(SchemaClass):
title = TEXT(
phrase=True, sortable=True, stored=True,
field_boost=2.0, spelling=True, analyzer=StemmingAnalyzer())
keywords = KEYWORD(
commas=True, field_boost=1.5, lowercase=True)
authors = KEYWORD(stored=True, commas=True, lowercase=True)
content = TEXT(spelling=True, analyzer=StemmingAnalyzer())
summary = TEXT(spelling=True, analyzer=StemmingAnalyzer())
published_time = DATETIME(stored=True, sortable=True)
permalink = STORED
thumbnail = STORED
article_id = ID(unique=True, stored=True)
topic = TEXT(spelling=True, stored=True)
series_id = STORED
tags = KEYWORD(commas=True, lowercase=True)
搜索查询
^{pr2}$当我尝试的标题搜索是有效的,但对作者和关键字的搜索不起作用。我不明白我在这里做错了什么。我从api获取数据,然后运行索引。一切正常。但是当我搜索像authors
和keywords
这样的关键字时,它就不起作用了。在
authors
和{对于
authors
,我认为您应该使用TEXT
。在从whoosh文档中
相关问题 更多 >
编程相关推荐