SolrDisMaxQuery::setQueryPhraseSlop

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)

Description

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

<?php

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

The above example will output something similar to:

defType=edismax&qs=3

© 1997–2017 The PHP Documentation Group
Licensed under the Creative Commons Attribution License v3.0 or later.
https://secure.php.net/manual/en/solrdismaxquery.setqueryphraseslop.php

在线笔记
App下载
App下载

扫描二维码

下载编程狮App

公众号
微信公众号

编程狮公众号

意见反馈
返回顶部