SolrDisMaxQuery::setQueryPhraseSlop

(No version information available, might only be in Git)
specifies the amount of slop permitted on phrase queries explicitly included in the user's query string (qf parameter)
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

Returns:

SolrDisMaxQuery

Examples:
SolrDisMaxQuery::setQueryPhraseSlop() example
<?php

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

The above example will output something similar to:

defType=edismax&qs=3
doc_php
2016-02-24 16:11:47
Comments
Leave a Comment

Please login to continue.