例
SphinxClient::addQuery
Sphinx
PHP Manual
SphinxClient クラス
導入
SphinxClient クラスは、Sphinx へのオブジェクト指向のインターフェイスを提供します。
クラス概要
SphinxClient
{
/* メソッド */
public
int
addQuery
(
string
$query
[,
string
$index
= "*"
[,
string
$comment
= ""
]] )
public
array
buildExcerpts
(
array
$docs
,
string
$index
,
string
$words
[,
array
$opts
] )
public
array
buildKeywords
(
string
$query
,
string
$index
,
bool
$hits
)
public
bool
close
(
void
)
__construct
(
void
)
public
string
escapeString
(
string
$string
)
public
string
getLastError
(
void
)
public
string
getLastWarning
(
void
)
public
bool
open
(
void
)
public
array
query
(
string
$query
[,
string
$index
= "*"
[,
string
$comment
= ""
]] )
public
void
resetFilters
(
void
)
public
void
resetGroupBy
(
void
)
public
array
runQueries
(
void
)
public
bool
setArrayResult
(
bool
$array_result
= false
)
public
bool
setConnectTimeout
(
float
$timeout
)
public
bool
setFieldWeights
(
array
$weights
)
public
bool
setFilter
(
string
$attribute
,
array
$values
[,
bool
$exclude
= false
] )
public
bool
setFilterFloatRange
(
string
$attribute
,
float
$min
,
float
$max
[,
bool
$exclude
= false
] )
public
bool
setFilterRange
(
string
$attribute
,
int
$min
,
int
$max
[,
bool
$exclude
= false
] )
public
bool
setGeoAnchor
(
string
$attrlat
,
string
$attrlong
,
float
$latitude
,
float
$longitude
)
public
bool
setGroupBy
(
string
$attribute
,
int
$func
[,
string
$groupsort
= "@group desc"
] )
public
bool
setGroupDistinct
(
string
$attribute
)
public
bool
setIDRange
(
int
$min
,
int
$max
)
public
bool
setIndexWeights
(
array
$weights
)
public
bool
setLimits
(
int
$offset
,
int
$limit
[,
int
$max_matches
= 0
[,
int
$cutoff
= 0
]] )
public
bool
setMatchMode
(
int
$mode
)
public
bool
setMaxQueryTime
(
int
$qtime
)
public
bool
setOverride
(
string
$attribute
,
int
$type
,
array
$values
)
public
bool
setRankingMode
(
int
$ranker
)
public
bool
setRetries
(
int
$count
[,
int
$delay
= 0
] )
public
bool
setSelect
(
string
$clause
)
public
bool
setServer
(
string
$server
,
int
$port
)
public
bool
setSortMode
(
int
$mode
[,
string
$sortby
] )
public
array
status
(
void
)
public
int
updateAttributes
(
string
$index
,
array
$attributes
,
array
$values
[,
bool
$mva
= false
] )
}
目次
SphinxClient::addQuery
— マルチクエリバッチにクエリを追加する
SphinxClient::buildExcerpts
— テキストの抜粋を作成する
SphinxClient::buildKeywords
— キーワードをクエリから抽出する
SphinxClient::close
— Closes previously opened persistent connection
SphinxClient::__construct
— 新しい SphinxClient オブジェクトを作成する
SphinxClient::escapeString
— 特殊文字をエスケープする
SphinxClient::getLastError
— 直近のエラーメッセージを取得する
SphinxClient::getLastWarning
— 直近の警告を取得する
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
例
SphinxClient::addQuery
Sphinx
PHP Manual