whoosh.matching.
Matcher
¶所有匹配者的基类。
all_ids
()¶返回匹配器中所有ID的生成器。
对于已经读取了一些日志(无论只生成剩余的日志还是从开始的所有日志)的匹配器,此方法返回的内容是未定义的,因此最好只在新的匹配器上使用此方法。
all_items
()¶返回匹配器中所有(ID、编码值)对的生成器。
对于已经读取了一些日志(无论只生成剩余的日志还是从开始的所有日志)的匹配器,此方法返回的内容是未定义的,因此最好只在新的匹配器上使用此方法。
block_quality
()¶根据当前加权算法,返回当前发布块的质量度量。加薪 NoQualityAvailable
如果匹配器或权重不支持质量测量。
children
()¶返回此匹配器的子匹配器的列表(可能为空)。
copy
()¶返回此匹配器的副本。
depth
()¶返回此匹配器下树的深度,如果此匹配器没有任何子级,则返回0。
id
()¶返回当前过帐的ID。
is_active
()¶如果此匹配器仍处于“活动”状态,则返回“真”,也就是说,它尚未到达发布列表的结尾。
items_as
(astype)¶返回匹配器中所有(ID,解码值)对的生成器。
对于已经读取了一些日志(无论只生成剩余的日志还是从开始的所有日志)的匹配器,此方法返回的内容是未定义的,因此最好只在新的匹配器上使用此方法。
matching_terms
(id=None)¶返回的迭代器 ("fieldname", "termtext")
元组为 currently matching 在这棵树上称火柴人。
max_quality
()¶根据当前的加权算法,返回此匹配器的最大可能质量度量。加薪 NoQualityAvailable
如果匹配器或权重不支持质量测量。
next
()¶将此匹配器移动到下一个日志。
replace
(minquality=0)¶返回此匹配器的可能简化版本。例如,如果unionmatcher的一个子级不再活动,则对unionmatcher调用此方法将返回另一个子级。
reset
()¶返回到发布列表的开头。
请注意,reset()可能不会在调用后执行预期的操作。 Matcher.replace()
,因为这可能意味着调用reset()不是在原始匹配器上,而是在优化的替换上。
score
()¶返回当前过账的分数。
skip_to
(id)¶将此匹配器移动到ID等于或大于给定ID的第一个日志。
skip_to_quality
(minquality)¶将此匹配器移动到下一个大于给定的最小质量值的块。
spans
()¶返回的列表 Span
此文档中匹配项的对象。如果要搜索的字段不存储位置,则引发异常。
supports
(astype)¶Returns True if the field's format supports the named data type, for example 'frequency' or 'characters'.
supports_block_quality
()¶如果此匹配器支持使用 quality
和 block_quality
.
term
()¶返回A ("fieldname", "termtext")
此匹配器匹配的术语的元组,如果此匹配器不是术语匹配器,则为无。
term_matchers
()¶返回此树中术语匹配器的迭代器。
value
()¶返回当前过帐的编码值。
value_as
(astype)¶返回当前过帐的值作为给定类型。
weight
()¶返回当前过帐的权重。
whoosh.matching.
NullMatcher
¶whoosh.matching.
ListMatcher
(ids, weights=None, values=None, format=None, scorer=None, position=0, all_weights=None, term=None, terminfo=None)¶由ID列表支持的合成匹配器。
参数: |
|
---|
whoosh.matching.
WrappingMatcher
(child, boost=1.0)¶包装子匹配器的匹配器的基类。
whoosh.matching.
MultiMatcher
(matchers, idoffsets, scorer=None, current=0)¶序列化子匹配器列表的结果。
参数: |
|
---|
whoosh.matching.
FilterMatcher
(child, ids, exclude=False, boost=1.0)¶根据ID是否存在于集合中或不存在于集合中,筛选包装中的过账。
参数: |
|
---|
whoosh.matching.
BiMatcher
(a, b)¶Base class for matchers that combine the results of two sub-matchers in some way.
whoosh.matching.
AdditiveBiMatcher
(a, b)¶二元匹配器的基类,其中子匹配器的分数相加。
whoosh.matching.
UnionMatcher
(a, b)¶匹配两个子匹配项中发布的并集(或)。
whoosh.matching.
DisjunctionMaxMatcher
(a, b, tiebreak=0.0)¶匹配两个子匹配项的联合(或)。Where both sub-matchers match the same posting, returns the weight/score of the higher-scoring posting.
whoosh.matching.
IntersectionMatcher
(a, b)¶匹配两个子匹配项中过账的交集(和)。
whoosh.matching.
AndNotMatcher
(a, b)¶匹配第一个子匹配器中第二个子匹配器中不存在的日志。
whoosh.matching.
InverseMatcher
(child, limit, missing=None, weight=1.0, id=0)¶合成匹配器,生成包装的匹配器中不存在的日志。
whoosh.matching.
RequireMatcher
(a, b)¶匹配两个子匹配项中的日志,但只使用第一个匹配项的分数。
whoosh.matching.
AndMaybeMatcher
(a, b)¶匹配第一个子匹配者中的帖子,如果相同的帖子在第二个子匹配者中,则添加他们的分数。
whoosh.matching.
ConstantScoreMatcher
(score=1.0)¶