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

SolrDisMaxQuery::setQueryPhraseSlop

(No version information available, might only be in Git)

SolrDisMaxQuery::setQueryPhraseSlop — specifies the amount of slop permitted on phrase queries explicitly included in the user's query string (qf parameter)

Description

代码语言:javascript
复制
public SolrDisMaxQuery SolrDisMaxQuery::setQueryPhraseSlop ( string $slop )

The Query Phrase Slop is the amount of slop permitted on phrase queries explicitly included in the user's query string with the qf parameter.

slop refers to the number of positions one token needs to be moved in relation to another token in order to match a phrase specified in a query.

Parameters

slop

Amount of slop

Return Values

SolrDisMaxQuery

Examples

Example #1 SolrDisMaxQuery::setQueryPhraseSlop() example

代码语言:javascript
复制
<?php

$dismaxQuery?=?new?SolrDisMaxQuery();
$dismaxQuery->setQueryPhraseSlop(3);
echo?$dismaxQuery;
?>

The above example will output something similar to:

代码语言:javascript
复制
defType=edismax&qs=3

← SolrDisMaxQuery::setQueryAlt

SolrDisMaxQuery::setTieBreaker →

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

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

扫码关注腾讯云开发者

领取腾讯云代金券

http://www.vxiaotou.com