<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> <html> <head> <meta http-equiv="content-type" content="text/html; charset=UTF-8"> <title>Specifies the amount of slop permitted on phrase queries explicitly included in the user's query string (qf parameter)</title> </head> <body><div class="manualnavbar" style="text-align: center;"> <div class="prev" style="text-align: left; float: left;"><a href="solrdismaxquery.setqueryalt.html">SolrDisMaxQuery::setQueryAlt</a></div> <div class="next" style="text-align: right; float: right;"><a href="solrdismaxquery.settiebreaker.html">SolrDisMaxQuery::setTieBreaker</a></div> <div class="up"><a href="class.solrdismaxquery.html">SolrDisMaxQuery</a></div> <div class="home"><a href="index.html">PHP Manual</a></div> </div><hr /><div id="solrdismaxquery.setqueryphraseslop" class="refentry"> <div class="refnamediv"> <h1 class="refname">SolrDisMaxQuery::setQueryPhraseSlop</h1> <p class="verinfo">(No version information available, might only be in Git)</p><p class="refpurpose"><span class="refname">SolrDisMaxQuery::setQueryPhraseSlop</span> — <span class="dc-title">Specifies the amount of slop permitted on phrase queries explicitly included in the user's query string (qf parameter)</span></p> </div> <div class="refsect1 description" id="refsect1-solrdismaxquery.setqueryphraseslop-description"> <h3 class="title">Description</h3> <div class="methodsynopsis dc-description"> <span class="modifier">public</span> <span class="type"><a href="class.solrdismaxquery.html" class="type SolrDisMaxQuery">SolrDisMaxQuery</a></span> <span class="methodname"><strong>SolrDisMaxQuery::setQueryPhraseSlop</strong></span> ( <span class="methodparam"><span class="type">string</span> <code class="parameter">$slop</code></span> )</div> <p class="para rdfs-comment"> The Query Phrase Slop is the amount of slop permitted on phrase queries explicitly included in the user's query string with the <em class="emphasis">qf</em> parameter. </p> <p class="para"> 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. </p> </div> <div class="refsect1 parameters" id="refsect1-solrdismaxquery.setqueryphraseslop-parameters"> <h3 class="title">Parameters</h3> <dl> <dt> <code class="parameter">slop</code></dt> <dd> <p class="para"> Amount of slop </p> </dd> </dl> </div> <div class="refsect1 returnvalues" id="refsect1-solrdismaxquery.setqueryphraseslop-returnvalues"> <h3 class="title">Return Values</h3> <p class="para"> <span class="type"><a href="class.solrdismaxquery.html" class="type SolrDisMaxQuery">SolrDisMaxQuery</a></span> </p> </div> <div class="refsect1 examples" id="refsect1-solrdismaxquery.setqueryphraseslop-examples"> <h3 class="title">Examples</h3> <div class="example" id="example-5913"> <p><strong>Example #1 <span class="function"><strong>SolrDisMaxQuery::setQueryPhraseSlop()</strong></span> example</strong></p> <div class="example-contents"> <div class="phpcode"><code><span style="color: #000000"> <span style="color: #0000BB"><?php<br /><br />$dismaxQuery </span><span style="color: #007700">= new </span><span style="color: #0000BB">SolrDisMaxQuery</span><span style="color: #007700">();<br /></span><span style="color: #0000BB">$dismaxQuery</span><span style="color: #007700">-></span><span style="color: #0000BB">setQueryPhraseSlop</span><span style="color: #007700">(</span><span style="color: #0000BB">3</span><span style="color: #007700">);<br />echo </span><span style="color: #0000BB">$dismaxQuery</span><span style="color: #007700">;<br /></span><span style="color: #0000BB">?></span> </span> </code></div> </div> <div class="example-contents"><p>The above example will output something similar to:</p></div> <div class="example-contents screen"> <div class="cdata"><pre> defType=edismax&qs=3 </pre></div> </div> </div> </div> </div><hr /><div class="manualnavbar" style="text-align: center;"> <div class="prev" style="text-align: left; float: left;"><a href="solrdismaxquery.setqueryalt.html">SolrDisMaxQuery::setQueryAlt</a></div> <div class="next" style="text-align: right; float: right;"><a href="solrdismaxquery.settiebreaker.html">SolrDisMaxQuery::setTieBreaker</a></div> <div class="up"><a href="class.solrdismaxquery.html">SolrDisMaxQuery</a></div> <div class="home"><a href="index.html">PHP Manual</a></div> </div></body></html>