GoLang SphinxClient::setFieldWeights

request it (387)
GoLang replacement for PHP's SphinxClient::setFieldWeights [edit | history]



Do you know a GoLang replacement for PHP's SphinxClient::setFieldWeights? Write it!

PHP SphinxClient::setFieldWeights

PHP original manual for SphinxClient::setFieldWeights [ show | php.net ]

SphinxClient::setFieldWeights

(PECL sphinx >= 0.1.0)

SphinxClient::setFieldWeightsSet field weights

Description

public bool SphinxClient::setFieldWeights ( array $weights )

Binds per-field weights by name.

Match ranking can be affected by per-field weights. See » Sphinx documentation for an explanation on how phrase proximity ranking is affected. This call lets you specify non-default weights for full-text fields.

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.

Parameters

weights

Associative array of field names and field weights.

Return Values

Returns TRUE on success or FALSE on failure.