메소드 |
설명 |
|
AddQuery ( $query, $index = "*", $comment = "" ) |
returns index into results array from RunQueries() call |
|
BuildExcerpts ( $docs, $index, $words, $opts = [] ) |
an array of snippets on success |
|
BuildKeywords ( $query, $index, $hits ) |
an array of words on success |
|
Close ( ) |
|
|
EscapeString ( $string ) |
|
|
FlushAttributes ( ) |
|
|
GetLastError ( ) |
get last error message (string) |
|
GetLastWarning ( ) |
get last warning message (string) |
|
IsConnectError ( ) |
get last error flag (to tell network connection errors from searchd errors or broken responses) |
|
Open ( ) |
|
|
Query ( $query, $index = "*", $comment = "" ) |
and return the search results |
|
ResetFilters ( ) |
clear all filters (for multi-queries) |
|
ResetGroupBy ( ) |
clear groupby settings (for multi-queries) |
|
ResetOverrides ( ) |
clear all attribute value overrides (for multi-queries) |
|
RunQueries ( ) |
connect to searchd, run queries batch, and return an array of result sets |
|
SetArrayResult ( $arrayresult ) |
PHP specific; needed for group-by-MVA result sets that may contain duplicate IDs |
|
SetConnectTimeout ( $timeout ) |
set server connection timeout (0 to remove) |
|
SetFieldWeights ( $weights ) |
bind per-field weights by name |
|
SetFilter ( $attribute, $values, $exclude = false ) |
only match records where $attribute value is in given set |
|
SetFilterFloatRange ( $attribute, $min, $max, $exclude = false ) |
only match records if $attribute value is beetwen $min and $max (inclusive) |
|
SetFilterRange ( $attribute, $min, $max, $exclude = false ) |
only match records if $attribute value is beetwen $min and $max (inclusive) |
|
SetGeoAnchor ( $attrlat, $attrlong, $lat, $long ) |
latitude and longitude must be in radians |
|
SetGroupBy ( $attribute, $func, $groupsort = "@group desc" ) |
set grouping attribute and function |
|
SetGroupDistinct ( $attribute ) |
set count-distinct attribute for group-by queries |
|
SetIDRange ( $min, $max ) |
only match records if document ID is beetwen $min and $max (inclusive) |
|
SetIndexWeights ( $weights ) |
bind per-index weights by name |
|
SetLimits ( $offset, $limit, $max, $cutoff ) |
and optionally set max-matches and cutoff limits |
|
SetMatchMode ( $mode ) |
set matching mode |
|
SetMaxQueryTime ( $max ) |
integer, 0 means "do not limit" |
|
SetOverride ( $attrname, $attrtype, $values ) |
$values must be a hash that maps document IDs to attribute values |
|
SetRankingMode ( $ranker ) |
set ranking mode |
|
SetRetries ( $count, $delay ) |
set distributed retries count and delay |
|
SetSelect ( $select ) |
set select-list (attributes or expressions), SQL-like syntax |
|
SetServer ( $host, $port ) |
set searchd host name (string) and port (integer) |
|
SetSortMode ( $mode, $sortby = "" ) |
set matches sorting mode |
|
SetWeights ( $weights ) |
DEPRECATED; use SetFieldWeights() instead |
|
Status ( ) |
|
|
UpdateAttributes ( $index, $attrs, $values, $mva = false ) |
returns amount of updated documents (0 or more) on success, or -1 on failure |
|
_Connect ( ) |
connect to searchd server |
|
_GetResponse ( $fp, $client_ver ) |
get and check response packet from searchd server |
|
_MBPop ( ) |
leave mbstring workaround mode |
|
_MBPush ( ) |
enter mbstring workaround mode |
|
_PackFloat ( $f ) |
helper to pack floats in network byte order |
|
_ParseSearchResponse ( $response, $nreqs ) |
parse and return search query (or queries) response |
|
_Send ( $handle, $data, $length ) |
|
|
__construct ( ) |
create a new client object and fill defaults |
|
__destruct ( ) |
|
|