phpBB API Documentation
Class

SphinxClient

class SphinxClient

Properties

$_host
$_port
$_offset
$_limit
$_mode
$_weights
$_sort
$_sortby
$_min_id
$_max_id
$_filters
$_groupby
$_groupfunc
$_groupsort
$_groupdistinct
$_maxmatches
$_cutoff
$_retrycount
$_retrydelay
$_anchor
$_indexweights
$_ranker
$_rankexpr
$_maxquerytime
$_fieldweights
$_overrides
$_select
$_error
$_warning
$_connerror
$_reqs
$_mbenc
$_arrayresult
$_timeout

Methods

SphinxClient()

__destruct()

GetLastError()

GetLastWarning()

IsConnectError()

SetServer($host, $port)

SetConnectTimeout($timeout)

_Send($handle, $data, $length)

_MBPush()

_MBPop()

_Connect()

_GetResponse($fp, $client_ver)

SetLimits($offset, $limit, $max, $cutoff)

SetMaxQueryTime($max)

SetMatchMode($mode)

SetRankingMode($ranker, $rankexpr = '')

SetSortMode($mode, $sortby = '')

SetWeights($weights)

SetFieldWeights($weights)

SetIndexWeights($weights)

SetIDRange($min, $max)

SetFilter($attribute, $values, $exclude = false)

SetFilterRange($attribute, $min, $max, $exclude = false)

SetFilterFloatRange($attribute, $min, $max, $exclude = false)

SetGeoAnchor($attrlat, $attrlong, $lat, $long)

SetGroupBy($attribute, $func, $groupsort = '@group desc')

SetGroupDistinct($attribute)

SetRetries($count, $delay)

SetArrayResult($arrayresult)

SetOverride($attrname, $attrtype, $values)

SetSelect($select)

ResetFilters()

ResetGroupBy()

ResetOverrides()

Query($query, $index = '*', $comment = '')

_PackFloat($f)

AddQuery($query, $index = '*', $comment = '')

RunQueries()

_ParseSearchResponse($response, $nreqs)

BuildExcerpts($docs, $index, $words, $opts = array())

BuildKeywords($query, $index, $hits)

EscapeString($string)

UpdateAttributes($index, $attrs, $values, $mva = false)

Open()

Close()

Status()

FlushAttributes()

Details

at line 430
public SphinxClient()

at line 475
public __destruct()

at line 482
public GetLastError()

at line 488
public GetLastWarning()

at line 494
public IsConnectError()

at line 500
public SetServer($host, $port)

Parameters

$host
$port

at line 522
public SetConnectTimeout($timeout)

Parameters

$timeout

at line 529
public _Send($handle, $data, $length)

Parameters

$handle
$data
$length

at line 543
public _MBPush()

at line 554
public _MBPop()

at line 561
public _Connect()

at line 632
public _GetResponse($fp, $client_ver)

Parameters

$fp
$client_ver

at line 704
public SetLimits($offset, $limit, $max, $cutoff)

Parameters

$offset
$limit
$max
$cutoff

at line 721
public SetMaxQueryTime($max)

Parameters

$max

at line 729
public SetMatchMode($mode)

Parameters

$mode

at line 742
public SetRankingMode($ranker, $rankexpr = '')

Parameters

$ranker
$rankexpr

at line 751
public SetSortMode($mode, $sortby = '')

Parameters

$mode
$sortby

at line 769
public SetWeights($weights)

Parameters

$weights

at line 779
public SetFieldWeights($weights)

Parameters

$weights

at line 791
public SetIndexWeights($weights)

Parameters

$weights

at line 804
public SetIDRange($min, $max)

Parameters

$min
$max

at line 815
public SetFilter($attribute, $values, $exclude = false)

Parameters

$attribute
$values
$exclude

at line 832
public SetFilterRange($attribute, $min, $max, $exclude = false)

Parameters

$attribute
$min
$max
$exclude

at line 844
public SetFilterFloatRange($attribute, $min, $max, $exclude = false)

Parameters

$attribute
$min
$max
$exclude

at line 857
public SetGeoAnchor($attrlat, $attrlong, $lat, $long)

Parameters

$attrlat
$attrlong
$lat
$long

at line 868
public SetGroupBy($attribute, $func, $groupsort = '@group desc')

Parameters

$attribute
$func
$groupsort

at line 885
public SetGroupDistinct($attribute)

Parameters

$attribute

at line 892
public SetRetries($count, $delay)

Parameters

$count
$delay

at line 902
public SetArrayResult($arrayresult)

Parameters

$arrayresult

at line 911
public SetOverride($attrname, $attrtype, $values)

Parameters

$attrname
$attrtype
$values

at line 921
public SetSelect($select)

Parameters

$select

at line 930
public ResetFilters()

at line 937
public ResetGroupBy()

at line 946
public ResetOverrides()

at line 955
public Query($query, $index = '*', $comment = '')

Parameters

$query
$index
$comment

at line 975
public _PackFloat($f)

Parameters

$f

at line 984
public AddQuery($query, $index = '*', $comment = '')

Parameters

$query
$index
$comment

at line 1100
public RunQueries()

at line 1138
public _ParseSearchResponse($response, $nreqs)

Parameters

$response
$nreqs

at line 1309
public BuildExcerpts($docs, $index, $words, $opts = array())

Parameters

$docs
$index
$words
$opts

at line 1434
public BuildKeywords($query, $index, $hits)

Parameters

$query
$index
$hits

at line 1511
public EscapeString($string)

Parameters

$string

at line 1525
public UpdateAttributes($index, $attrs, $values, $mva = false)

Parameters

$index
$attrs
$values
$mva

at line 1608
public Open()

at line 1627
public Close()

at line 1645
public Status()

at line 1681
public FlushAttributes()