array ( 0 => 'index.php', 1 => 'PHP Manual', ), 'head' => array ( 0 => 'UTF-8', 1 => 'uk', ), 'this' => array ( 0 => 'solrdismaxquery.setphraseslop.php', 1 => 'SolrDisMaxQuery::setPhraseSlop', 2 => 'Sets the default slop on phrase queries (ps parameter)', ), 'up' => array ( 0 => 'class.solrdismaxquery.php', 1 => 'SolrDisMaxQuery', ), 'prev' => array ( 0 => 'solrdismaxquery.setphrasefields.php', 1 => 'SolrDisMaxQuery::setPhraseFields', ), 'next' => array ( 0 => 'solrdismaxquery.setqueryalt.php', 1 => 'SolrDisMaxQuery::setQueryAlt', ), 'alternatives' => array ( ), 'source' => array ( 'lang' => 'en', 'path' => 'reference/solr/solrdismaxquery/setphraseslop.xml', ), 'history' => array ( ), ); $setup["toc"] = $TOC; $setup["toc_deprecated"] = $TOC_DEPRECATED; $setup["parents"] = $PARENTS; manual_setup($setup); contributors($setup); ?>

SolrDisMaxQuery::setPhraseSlop

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

SolrDisMaxQuery::setPhraseSlopSets the default slop on phrase queries (ps parameter)

Опис

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

Sets the default amount of slop on phrase queries built with "pf", "pf2" and/or "pf3" fields (affects boosting). "ps" parameter

Параметри

slop

Значення, що повертаються

SolrDisMaxQuery

Приклади

Приклад #1 SolrDisMaxQuery::setPhraseSlop() example

<?php

$dismaxQuery
= new SolrDisMaxQuery('lucene');

$dismaxQuery->setPhraseSlop(4);
echo
$dismaxQuery.PHP_EOL;

?>

Поданий вище приклад виведе:

q=lucene&defType=edismax&ps=4