略微加速

PHP官方手册 - 互联网笔记

PHP - Manual: SolrDisMaxQuery::setQueryPhraseSlop

2025-02-27

SolrDisMaxQuery::setQueryPhraseSlop

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

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

说明

public SolrDisMaxQuery::setQueryPhraseSlop(string $slop): SolrDisMaxQuery

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.

参数

slop

Amount of slop

返回值

SolrDisMaxQuery

示例

示例 #1 SolrDisMaxQuery::setQueryPhraseSlop() example

<?php

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

以上示例的输出类似于:

defType=edismax&qs=3
添加备注

用户贡献的备注

此页面尚无用户贡献的备注。

官方地址:https://www.php.net/manual/en/solrdismaxquery.setqueryphraseslop.php

北京半月雨文化科技有限公司.版权所有 京ICP备12026184号-3