<!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>Set field weights</title> </head> <body><div class="manualnavbar" style="text-align: center;"> <div class="prev" style="text-align: left; float: left;"><a href="sphinxclient.setconnecttimeout.html">SphinxClient::setConnectTimeout</a></div> <div class="next" style="text-align: right; float: right;"><a href="sphinxclient.setfilter.html">SphinxClient::setFilter</a></div> <div class="up"><a href="class.sphinxclient.html">SphinxClient</a></div> <div class="home"><a href="index.html">PHP Manual</a></div> </div><hr /><div id="sphinxclient.setfieldweights" class="refentry"> <div class="refnamediv"> <h1 class="refname">SphinxClient::setFieldWeights</h1> <p class="verinfo">(PECL sphinx >= 0.1.0)</p><p class="refpurpose"><span class="refname">SphinxClient::setFieldWeights</span> — <span class="dc-title">Set field weights</span></p> </div> <div class="refsect1 description" id="refsect1-sphinxclient.setfieldweights-description"> <h3 class="title">Description</h3> <div class="methodsynopsis dc-description"> <span class="modifier">public</span> <span class="type">bool</span> <span class="methodname"><strong>SphinxClient::setFieldWeights</strong></span> ( <span class="methodparam"><span class="type">array</span> <code class="parameter">$weights</code></span> )</div> <p class="para rdfs-comment"> Binds per-field weights by name. </p> <p class="para"> Match ranking can be affected by per-field weights. See <a href="http://sphinxsearch.com/" class="link external">» Sphinx documentation</a> for an explanation on how phrase proximity ranking is affected. This call lets you specify non-default weights for full-text fields. </p> <p class="para"> The weights must be positive 32-bit integers, so be careful not to hit 32-bit integer maximum. The final weight is a 32-bit integer too. Default weight value is 1. Unknown field names are silently ignored. </p> </div> <div class="refsect1 parameters" id="refsect1-sphinxclient.setfieldweights-parameters"> <h3 class="title">Parameters</h3> <p class="para"> <dl> <dt> <span class="term"><em><code class="parameter">weights</code></em></span> <dd> <p class="para"> Associative array of field names and field weights. </p> </dd> </dt> </dl> </p> </div> <div class="refsect1 returnvalues" id="refsect1-sphinxclient.setfieldweights-returnvalues"> <h3 class="title">Return Values</h3> <p class="para"> Returns <strong><code>TRUE</code></strong> on success or <strong><code>FALSE</code></strong> on failure. </p> </div> <div class="refsect1 seealso" id="refsect1-sphinxclient.setfieldweights-seealso"> <h3 class="title">See Also</h3> <p class="para"> <ul class="simplelist"> <li class="member"><a href="sphinxclient.setindexweights.html" class="xref">SphinxClient::setIndexWeights</a></li> </ul> </p> </div> </div><hr /><div class="manualnavbar" style="text-align: center;"> <div class="prev" style="text-align: left; float: left;"><a href="sphinxclient.setconnecttimeout.html">SphinxClient::setConnectTimeout</a></div> <div class="next" style="text-align: right; float: right;"><a href="sphinxclient.setfilter.html">SphinxClient::setFilter</a></div> <div class="up"><a href="class.sphinxclient.html">SphinxClient</a></div> <div class="home"><a href="index.html">PHP Manual</a></div> </div></body></html>