The SphinxClient class
Introduction
(PECL sphinx >= 0.1.0)
The SphinxClient class provides object-oriented interface to Sphinx.
Class synopsis
SphinxClient {
/* Methods */
public addQuery ( string $query [, string $index = "*" [, string $comment = "" ]] ) : int
public buildExcerpts ( array $docs , string $index , string $words [, array $opts ] ) : array|false
public buildKeywords ( string $query , string $index , bool $hits ) : array
public close ( ) : bool
public __construct ( )
public escapeString ( string $string ) : string
public getLastError ( ) : string
public getLastWarning ( ) : string
public open ( ) : bool
public query ( string $query [, string $index = "*" [, string $comment = "" ]] ) : array
public resetFilters ( ) : void
public resetGroupBy ( ) : void
public runQueries ( ) : array
public setArrayResult ( bool $array_result = false ) : bool
public setConnectTimeout ( float $timeout ) : bool
public setFieldWeights ( array $weights ) : bool
public setFilter ( string $attribute , array $values [, bool $exclude = false ] ) : bool
public setFilterFloatRange ( string $attribute , float $min , float $max [, bool $exclude = false ] ) : bool
public setFilterRange ( string $attribute , int $min , int $max [, bool $exclude = false ] ) : bool
public setGeoAnchor ( string $attrlat , string $attrlong , float $latitude , float $longitude ) : bool
public setGroupBy ( string $attribute , int $func [, string $groupsort = "@group desc" ] ) : bool
public setGroupDistinct ( string $attribute ) : bool
public setIDRange ( int $min , int $max ) : bool
public setIndexWeights ( array $weights ) : bool
public setLimits ( int $offset , int $limit [, int $max_matches = 0 [, int $cutoff = 0 ]] ) : bool
public setMatchMode ( int $mode ) : bool
public setMaxQueryTime ( int $qtime ) : bool
public setOverride ( string $attribute , int $type , array $values ) : bool
public setRankingMode ( int $ranker ) : bool
public setRetries ( int $count [, int $delay = 0 ] ) : bool
public setSelect ( string $clause ) : bool
public setServer ( string $server , int $port ) : bool
public setSortMode ( int $mode [, string $sortby ] ) : bool
public status ( ) : array
public updateAttributes ( string $index , array $attributes , array $values [, bool $mva = false ] ) : int}
Table of Contents
- SphinxClient::addQuery — Add query to multi-query batch
- SphinxClient::buildExcerpts — Build text snippets
- SphinxClient::buildKeywords — Extract keywords from query
- SphinxClient::close — Closes previously opened persistent connection
- SphinxClient::__construct — Create a new SphinxClient object
- SphinxClient::escapeString — Escape special characters
- SphinxClient::getLastError — Get the last error message
- SphinxClient::getLastWarning — Get the last warning
- SphinxClient::open — Opens persistent connection to the server
- SphinxClient::query — Execute search query
- SphinxClient::resetFilters — Clear all filters
- SphinxClient::resetGroupBy — Clear all group-by settings
- SphinxClient::runQueries — Run a batch of search queries
- SphinxClient::setArrayResult — Change the format of result set array
- SphinxClient::setConnectTimeout — Set connection timeout
- SphinxClient::setFieldWeights — Set field weights
- SphinxClient::setFilter — Add new integer values set filter
- SphinxClient::setFilterFloatRange — Add new float range filter
- SphinxClient::setFilterRange — Add new integer range filter
- SphinxClient::setGeoAnchor — Set anchor point for a geosphere distance calculations
- SphinxClient::setGroupBy — Set grouping attribute
- SphinxClient::setGroupDistinct — Set attribute name for per-group distinct values count calculations
- SphinxClient::setIDRange — Set a range of accepted document IDs
- SphinxClient::setIndexWeights — Set per-index weights
- SphinxClient::setLimits — Set offset and limit of the result set
- SphinxClient::setMatchMode — Set full-text query matching mode
- SphinxClient::setMaxQueryTime — Set maximum query time
- SphinxClient::setOverride — Sets temporary per-document attribute value overrides
- SphinxClient::setRankingMode — Set ranking mode
- SphinxClient::setRetries — Set retry count and delay
- SphinxClient::setSelect — Set select clause
- SphinxClient::setServer — Set searchd host and port
- SphinxClient::setSortMode — Set matches sorting mode
- SphinxClient::status — Queries searchd status
- SphinxClient::updateAttributes — Update document attributes
© 1997–2020 The PHP Documentation Group
Licensed under the Creative Commons Attribution License v3.0 or later.
https://www.php.net/manual/en/class.sphinxclient.php