首页
学习
活动
专区
工具
TVP
发布
精选内容/技术社群/优惠产品,尽在小程序
立即前往

SphinxClient::setRankingMode

(PECL sphinx >= 0.1.0)

SphinxClient::setRankingMode — Set ranking mode

Description

代码语言:javascript
复制
public bool SphinxClient::setRankingMode ( int $ranker )

Sets ranking mode. Only available in SPH_MATCH_EXTENDED2 matching mode.

Constant

Description

SPH_RANK_PROXIMITY_BM25

Default ranking mode which uses both proximity and BM25 ranking.

SPH_RANK_BM25

Statistical ranking mode which uses BM25 ranking only (similar to most of other full-text engines). This mode is faster, but may result in worse quality on queries which contain more than 1 keyword.

SPH_RANK_NONE

Disables ranking. This mode is the fastest. It is essentially equivalent to boolean searching, a weight of 1 is assigned to all matches.

Parameters

ranker

Ranking mode.

Return Values

Returns TRUE on success or FALSE on failure.

See Also

  • SphinxClient::setMatchMode

← SphinxClient::setOverride

SphinxClient::setRetries →

代码语言:txt
复制
 © 1997–2017 The PHP Documentation Group

Licensed under the Creative Commons Attribution License v3.0 or later.

扫码关注腾讯云开发者

领取腾讯云代金券