Sphinx
SphinxClient::addQuery
Sphinx
PHP Manual
The SphinxClient class
Introduction
The SphinxClient class provides object-oriented interface to Sphinx.
Synopsis de la classe
SphinxClient
SphinxClient
{
/* Methods */
public
int
SphinxClient::addQuery
(
string
$query
[,
string
$index
[,
string
$comment
]] )
public
array
SphinxClient::buildExcerpts
(
array
$docs
,
string
$index
,
string
$words
[,
array
$opts
] )
public
array
SphinxClient::buildKeywords
(
string
$query
,
string
$index
,
bool
$hits
)
SphinxClient::__construct
(
void
)
public
string
SphinxClient::escapeString
(
string
$string
)
public
string
SphinxClient::getLastError
(
void
)
public
string
SphinxClient::getLastWarning
(
void
)
public
array
SphinxClient::query
(
string
$query
[,
string
$index
[,
string
$comment
]] )
public
void
SphinxClient::resetFilters
(
void
)
public
void
SphinxClient::resetGroupBy
(
void
)
public
array
SphinxClient::runQueries
(
void
)
public
bool
SphinxClient::setArrayResult
(
bool
$array_result
)
public
bool
SphinxClient::setConnectTimeout
(
float
$timeout
)
public
bool
SphinxClient::setFieldWeights
(
array
$weights
)
public
bool
SphinxClient::setFilter
(
string
$attribute
,
array
$values
[,
bool
$exclude
] )
public
bool
SphinxClient::setFilterFloatRange
(
string
$attribute
,
float
$min
,
float
$max
[,
bool
$exclude
] )
public
bool
SphinxClient::setFilterRange
(
string
$attribute
,
int
$min
,
int
$max
[,
bool
$exclude
] )
public
bool
SphinxClient::setGeoAnchor
(
string
$attrlat
,
string
$attrlong
,
float
$latitude
,
float
$longitude
)
public
bool
SphinxClient::setGroupBy
(
string
$attribute
,
int
$func
[,
string
$groupsort
] )
public
bool
SphinxClient::setGroupDistinct
(
string
$attribute
)
public
bool
SphinxClient::setIDRange
(
int
$min
,
int
$max
)
public
bool
SphinxClient::setIndexWeights
(
array
$weights
)
public
bool
SphinxClient::setLimits
(
int
$offset
,
int
$limit
[,
int
$max
[,
int
$cutoff
]] )
public
bool
SphinxClient::setMatchMode
(
int
$mode
)
public
bool
SphinxClient::setMaxQueryTime
(
int
$qtime
)
public
bool
SphinxClient::setRankingMode
(
int
$ranker
)
public
bool
SphinxClient::setRetries
(
int
$count
[,
int
$delay
] )
public
bool
SphinxClient::setServer
(
string
$server
,
int
$port
)
public
bool
SphinxClient::setSortMode
(
int
$mode
[,
string
$sortby
] )
public
int
SphinxClient::updateAttributes
(
string
$index
,
array
$attributes
,
array
$values
)
}
Sommaire
SphinxClient::addQuery
— Add query to multi-query batch
SphinxClient::buildExcerpts
— Build text snippets
SphinxClient::buildKeywords
— Extract keywords from query
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::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::setRankingMode
— Set ranking mode
SphinxClient::setRetries
— Set retry count and delay
SphinxClient::setServer
— Set searchd host and port
SphinxClient::setSortMode
— Set matches sorting mode
SphinxClient::updateAttributes
— Update document attributes
Sphinx
SphinxClient::addQuery
Sphinx
PHP Manual