+ Highlighting options
+
+
+
+ Option
+ Description
+
+
+
+
+ "before_match"
+ A string to insert before a keyword match. Default is "<b>".
+
+
+ "after_match"
+ A string to insert after a keyword match. Default is "</b>".
+
+
+ "chunk_separator"
+ A string to insert between snippet chunks (passages). Default is " ... ".
+
+
+ "limit"
+ Maximum snippet size, in symbols (codepoints). Integer, default is 256.
+
+
+ "around"
+ How much words to pick around each matching keywords block. Integer, default is 5.
+
+
+ "exact_phrase"
+ Whether to highlight exact query phrase matches only instead of
+ individual keywords. Boolean, default is &false;.
+
+
+ "single_passage"
+ Whether to extract single best passage only. Boolean, default is &false;.
+
+
+
+
+
+
+
+
+ &reftitle.returnvalues;
+
+ Returns array of snippets on success, or &false; on failure.
+
+
+
+
+
+
diff --git a/reference/sphinx/sphinxclient/buildkeywords.xml b/reference/sphinx/sphinxclient/buildkeywords.xml
new file mode 100644
index 0000000000..f5939aa676
--- /dev/null
+++ b/reference/sphinx/sphinxclient/buildkeywords.xml
@@ -0,0 +1,86 @@
+
+
+
+
+
+ SphinxClient::buildKeywords
+ Extract keywords from query
+
+
+
+ &reftitle.description;
+
+ publicarraySphinxClient::buildKeywords
+ stringquery
+ stringindex
+ boolhits
+
+
+ Extracts keywords from query using tokenizer
+ settings for the given index, optionally with
+ per-keyword occurrence statistics.
+
+
+
+
+ &reftitle.parameters;
+
+
+
+ query
+
+
+ A query to extract keywords from.
+
+
+
+
+ index
+
+
+ An index to get tokenizing settings and keyword occurrence statistics
+ from.
+
+
+
+
+ hits
+
+
+ A boolean flag to enable/disable keyword statistics generation.
+
+
+
+
+
+
+
+
+ &reftitle.returnvalues;
+
+ Returns an array of associative arrays with per-keyword information.
+
+
+
+
+
+
diff --git a/reference/sphinx/sphinxclient/construct.xml b/reference/sphinx/sphinxclient/construct.xml
new file mode 100644
index 0000000000..a86a604c33
--- /dev/null
+++ b/reference/sphinx/sphinxclient/construct.xml
@@ -0,0 +1,47 @@
+
+
+
+
+
+ SphinxClient::__construct
+ Create a new SphinxClient object
+
+
+
+ &reftitle.description;
+
+ SphinxClient::__construct
+
+
+
+ Creates a new SphinxClient object.
+
+
+
+
+ &reftitle.parameters;
+ &no.function.parameters;
+
+
+
+
+
diff --git a/reference/sphinx/sphinxclient/escapestring.xml b/reference/sphinx/sphinxclient/escapestring.xml
new file mode 100644
index 0000000000..6733c05101
--- /dev/null
+++ b/reference/sphinx/sphinxclient/escapestring.xml
@@ -0,0 +1,66 @@
+
+
+
+
+
+ SphinxClient::escapeString
+ Escape special characters
+
+
+
+ &reftitle.description;
+
+ publicstringSphinxClient::escapeString
+ stringstring
+
+
+ Escapes characters that are treated as special operators by the query
+ language parser.
+
+
+
+
+ &reftitle.parameters;
+
+
+
+ string
+
+
+ String to escape.
+
+
+
+
+
+
+
+
+ &reftitle.returnvalues;
+
+ Returns escaped string.
+
+
+
+
+
+
diff --git a/reference/sphinx/sphinxclient/getlasterror.xml b/reference/sphinx/sphinxclient/getlasterror.xml
new file mode 100644
index 0000000000..e140dc9515
--- /dev/null
+++ b/reference/sphinx/sphinxclient/getlasterror.xml
@@ -0,0 +1,58 @@
+
+
+
+
+
+ SphinxClient::getLastError
+ Get the last error message
+
+
+
+ &reftitle.description;
+
+ publicstringSphinxClient::getLastError
+
+
+
+ Returns string with the last error message. If there were no errors during
+ the previous API call, empty string is returned. This method doesn't reset
+ the error message, so you can safely call it several times.
+
+
+
+
+ &reftitle.parameters;
+ &no.function.parameters;
+
+
+
+ &reftitle.seealso;
+
+
+
+
+
+
+
+
+
+
diff --git a/reference/sphinx/sphinxclient/getlastwarning.xml b/reference/sphinx/sphinxclient/getlastwarning.xml
new file mode 100644
index 0000000000..381f4c4c1a
--- /dev/null
+++ b/reference/sphinx/sphinxclient/getlastwarning.xml
@@ -0,0 +1,58 @@
+
+
+
+
+
+ SphinxClient::getLastWarning
+ Get the last warning
+
+
+
+ &reftitle.description;
+
+ publicstringSphinxClient::getLastWarning
+
+
+
+ Returns last warning message. If there were no warnings during
+ the previous API call, empty string is returned. This method doesn't reset
+ the warning, so you can safely call it several times.
+
+
+
+
+ &reftitle.parameters;
+ &no.function.parameters;
+
+
+
+ &reftitle.seealso;
+
+
+
+
+
+
+
+
+
+
diff --git a/reference/sphinx/sphinxclient/query.xml b/reference/sphinx/sphinxclient/query.xml
new file mode 100644
index 0000000000..b3f9d606d9
--- /dev/null
+++ b/reference/sphinx/sphinxclient/query.xml
@@ -0,0 +1,136 @@
+
+
+
+
+
+ SphinxClient::query
+ Execute search query
+
+
+
+ &reftitle.description;
+
+ publicarraySphinxClient::query
+ stringquery
+ stringindex
+ stringcomment
+
+
+ Connects to searchd server, runs the given search query with the current settings,
+ obtains and returns the result set.
+
+
+
+
+ &reftitle.parameters;
+
+
+
+ query
+
+
+ Query string.
+
+
+
+
+ index
+
+
+ An index name (or names).
+
+
+
+
+ comment
+
+
+
+
+
+
+
+
+
+
+ &reftitle.returnvalues;
+
+ On success, SphinxClient::query() returns a list of
+ found matches and additional per-query statistics. The result set is a
+ hash utilize other structures instead of hash) with the following keys and
+ values:
+
+ Result set structure
+
+
+
+ Key
+ Value description
+
+
+
+
+ "matches"
+ An array with found document IDs as keys and their weight and
+ attributes values as values
+
+
+ "total"
+ Total number of matches found and retrieved (depends on your
+ settings)
+
+
+ "total_found"
+ Total number of found documents matching the query
+
+
+ "words"
+ An array with words (case-folded and stemmed) as keys and
+ per-word statistics as values
+
+
+ "error"
+ Query error message reported by searchd
+
+
+ "warning"
+ Query warning reported by searchd
+
+
+
+
+
+
+
+
+ &reftitle.seealso;
+
+
+
+
+
+
+
+
+
+
+
diff --git a/reference/sphinx/sphinxclient/resetfilters.xml b/reference/sphinx/sphinxclient/resetfilters.xml
new file mode 100644
index 0000000000..9c617d626a
--- /dev/null
+++ b/reference/sphinx/sphinxclient/resetfilters.xml
@@ -0,0 +1,55 @@
+
+
+
+
+
+ SphinxClient::resetFilters
+ Clear all filters
+
+
+
+ &reftitle.description;
+
+ publicvoidSphinxClient::resetFilters
+
+
+
+ Clears all currently set filters. This call is normally required when
+ using multi-queries. You might want to set different filters for different
+ queries in the batch. To do that, you should call
+ SphinxClient::resetFilters() and add new filters using
+ the respective calls.
+
+
+
+
+ &reftitle.seealso;
+
+
+
+
+
+
+
+
+
+
diff --git a/reference/sphinx/sphinxclient/resetgroupby.xml b/reference/sphinx/sphinxclient/resetgroupby.xml
new file mode 100644
index 0000000000..7a7ea5d364
--- /dev/null
+++ b/reference/sphinx/sphinxclient/resetgroupby.xml
@@ -0,0 +1,52 @@
+
+
+
+
+
+ SphinxClient::resetGroupBy
+ Clear all group-by settings
+
+
+
+ &reftitle.description;
+
+ publicvoidSphinxClient::resetGroupBy
+
+
+
+ Clears all currently group-by settings, and disables group-by.
+ This call is normally required only when using multi-queries.
+
+
+
+
+ &reftitle.seealso;
+
+
+
+
+
+
+
+
+
+
diff --git a/reference/sphinx/sphinxclient/runqueries.xml b/reference/sphinx/sphinxclient/runqueries.xml
new file mode 100644
index 0000000000..0ff2b2106c
--- /dev/null
+++ b/reference/sphinx/sphinxclient/runqueries.xml
@@ -0,0 +1,60 @@
+
+
+
+
+
+ SphinxClient::runQueries
+ Run a batch of search queries
+
+
+
+ &reftitle.description;
+
+ publicarraySphinxClient::runQueries
+
+
+
+ Connects to searchd, runs a batch of all queries added using , obtains and returns the result sets.
+
+
+
+
+ &reftitle.returnvalues;
+
+ Returns &false; on failure and array of result sets on success.
+
+
+
+
+ &reftitle.seealso;
+
+
+
+
+
+
+
+
+
+
+
diff --git a/reference/sphinx/sphinxclient/setarrayresult.xml b/reference/sphinx/sphinxclient/setarrayresult.xml
new file mode 100644
index 0000000000..f5e55f3273
--- /dev/null
+++ b/reference/sphinx/sphinxclient/setarrayresult.xml
@@ -0,0 +1,70 @@
+
+
+
+
+
+ SphinxClient::setArrayResult
+ Change the format of result set array
+
+
+
+ &reftitle.description;
+
+ publicboolSphinxClient::setArrayResult
+ boolarray_result
+
+
+ Controls the format of search results set arrays (whether matches should
+ be returned as an array or a hash).
+ If array_result is &false; (default value), matches
+ are returned as a hash with document IDs as keys, and other information (weight,
+ attributes) as values. If array_result is &true;, matches
+ are eturned as a plain array with complete per-match information including
+ document IDs.
+
+
+
+
+ &reftitle.parameters;
+
+
+
+ array_result
+
+
+
+
+
+
+
+
+
+
+ &reftitle.returnvalues;
+
+ Always returns &true;.
+
+
+
+
+
+
diff --git a/reference/sphinx/sphinxclient/setconnecttimeout.xml b/reference/sphinx/sphinxclient/setconnecttimeout.xml
new file mode 100644
index 0000000000..1daac3885f
--- /dev/null
+++ b/reference/sphinx/sphinxclient/setconnecttimeout.xml
@@ -0,0 +1,74 @@
+
+
+
+
+
+ SphinxClient::setConnectTimeout
+ Set connection timeout
+
+
+
+ &reftitle.description;
+
+ publicboolSphinxClient::setConnectTimeout
+ floattimeout
+
+
+ Sets connection timeout (in seconds) for searchd connection.
+
+
+
+
+ &reftitle.parameters;
+
+
+
+ timeout
+
+
+ Timeout in seconds.
+
+
+
+
+
+
+
+
+ &reftitle.returnvalues;
+
+ &return.success;
+
+
+
+
+ &reftitle.seealso;
+
+
+
+
+
+
+
+
+
+
diff --git a/reference/sphinx/sphinxclient/setfieldweights.xml b/reference/sphinx/sphinxclient/setfieldweights.xml
new file mode 100644
index 0000000000..e6307c15c0
--- /dev/null
+++ b/reference/sphinx/sphinxclient/setfieldweights.xml
@@ -0,0 +1,85 @@
+
+
+
+
+
+ SphinxClient::setFieldWeights
+ Set field weights
+
+
+
+ &reftitle.description;
+
+ publicboolSphinxClient::setFieldWeights
+ arrayweights
+
+
+ Binds per-field weights by name.
+
+
+ Match ranking can be affected by per-field weights. See Sphinx documentation for an explanation
+ on how phrase proximity ranking is affected. This call lets you specify
+ non-default weights for full-text fields.
+
+
+ The weights must be positive 32-bit integers, so be careful not to hit
+ 32-bit integer maximum. The final weight is a 32-bit integer too.
+ Default weight value is 1. Unknown field names are silently ignored.
+
+
+
+
+ &reftitle.parameters;
+
+
+
+ weights
+
+
+ Associative array of field names and field weights.
+
+
+
+
+
+
+
+
+ &reftitle.returnvalues;
+
+ &return.success;
+
+
+
+
+ &reftitle.seealso;
+
+
+
+
+
+
+
+
+
+
diff --git a/reference/sphinx/sphinxclient/setfilter.xml b/reference/sphinx/sphinxclient/setfilter.xml
new file mode 100644
index 0000000000..cb1a603d56
--- /dev/null
+++ b/reference/sphinx/sphinxclient/setfilter.xml
@@ -0,0 +1,95 @@
+
+
+
+
+
+ SphinxClient::setFilter
+ Add new integer values set filter
+
+
+
+ &reftitle.description;
+
+ publicboolSphinxClient::setFilter
+ stringattribute
+ arrayvalues
+ boolexclude
+
+
+ Adds new integer values set filter to the existing list of filters.
+
+
+
+
+ &reftitle.parameters;
+
+
+
+ attribute
+
+
+ An attribute name.
+
+
+
+
+ values
+
+
+ Plain array of integer values.
+
+
+
+
+ exclude
+
+
+ If set to &true;, matching documents are excluded from the result set.
+ Defaults to &false;.
+
+
+
+
+
+
+
+
+ &reftitle.returnvalues;
+
+ &return.success;
+
+
+
+
+ &reftitle.seealso;
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/reference/sphinx/sphinxclient/setfilterfloatrange.xml b/reference/sphinx/sphinxclient/setfilterfloatrange.xml
new file mode 100644
index 0000000000..b4ab6e51c5
--- /dev/null
+++ b/reference/sphinx/sphinxclient/setfilterfloatrange.xml
@@ -0,0 +1,109 @@
+
+
+
+
+
+ SphinxClient::setFilterFloatRange
+ Add new float range filter
+
+
+
+ &reftitle.description;
+
+ publicboolSphinxClient::setFilterFloatRange
+ stringattribute
+ floatmin
+ floatmax
+ boolexclude
+
+
+ Adds new float range filter to the existing list of filters.
+ Only those documents which have attribute
+ value stored in the index between min and
+ max (including values that are exactly equal
+ to min or max) will
+ be matched (or rejected, if exclude is &true;).
+
+
+
+
+ &reftitle.parameters;
+
+
+
+ attribute
+
+
+ An attribute name.
+
+
+
+
+ min
+
+
+ Minimum value.
+
+
+
+
+ max
+
+
+ Maximum value.
+
+
+
+
+ exclude
+
+
+ If set to &true;, matching documents are excluded from the result set.
+ Defaults to &false;.
+
+
+
+
+
+
+
+
+ &reftitle.returnvalues;
+
+ &return.success;
+
+
+
+
+ &reftitle.seealso;
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/reference/sphinx/sphinxclient/setfilterrange.xml b/reference/sphinx/sphinxclient/setfilterrange.xml
new file mode 100644
index 0000000000..b3cb110f8d
--- /dev/null
+++ b/reference/sphinx/sphinxclient/setfilterrange.xml
@@ -0,0 +1,109 @@
+
+
+
+
+
+ SphinxClient::setFilterRange
+ Add new integer range filter
+
+
+
+ &reftitle.description;
+
+ publicboolSphinxClient::setFilterRange
+ stringattribute
+ intmin
+ intmax
+ boolexclude
+
+
+ Adds new integer range filter to the existing list of filters.
+ Only those documents which have attribute
+ value stored in the index between min and
+ max (including values that are exactly equal
+ to min or max) will
+ be matched (or rejected, if exclude is &true;).
+
+
+
+
+ &reftitle.parameters;
+
+
+
+ attribute
+
+
+ An attribute name.
+
+
+
+
+ min
+
+
+ Minimum value.
+
+
+
+
+ max
+
+
+ Maximum value.
+
+
+
+
+ exclude
+
+
+ If set to &true;, matching documents are excluded from the result set.
+ Defaults to &false;.
+
+
+
+
+
+
+
+
+ &reftitle.returnvalues;
+
+ &return.success;
+
+
+
+
+ &reftitle.seealso;
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/reference/sphinx/sphinxclient/setgeoanchor.xml b/reference/sphinx/sphinxclient/setgeoanchor.xml
new file mode 100644
index 0000000000..ccf0eea094
--- /dev/null
+++ b/reference/sphinx/sphinxclient/setgeoanchor.xml
@@ -0,0 +1,109 @@
+
+
+
+
+
+ SphinxClient::setGeoAnchor
+ Set anchor point for a geosphere distance calculations
+
+
+
+ &reftitle.description;
+
+ publicboolSphinxClient::setGeoAnchor
+ stringattrlat
+ stringattrlong
+ floatlatitude
+ floatlongitude
+
+
+ Sets anchor point for a geosphere distance (geodistance) calculations
+ and enables them.
+
+
+ Once an anchor point is set, you can use magic "@geodist" attribute name in
+ your filters and/or sorting expressions.
+
+
+
+
+ &reftitle.parameters;
+
+
+
+ attrlat
+
+
+ Name of a latitude attribute.
+
+
+
+
+ attrlong
+
+
+ Name of a longitude attribute.
+
+
+
+
+ latitude
+
+
+ Anchor latitude in radians.
+
+
+
+
+ longitude
+
+
+ Anchor longitude in radians.
+
+
+
+
+
+
+
+
+ &reftitle.returnvalues;
+
+ &return.success;
+
+
+
+
+ &reftitle.seealso;
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/reference/sphinx/sphinxclient/setgroupby.xml b/reference/sphinx/sphinxclient/setgroupby.xml
new file mode 100644
index 0000000000..d1e158c49f
--- /dev/null
+++ b/reference/sphinx/sphinxclient/setgroupby.xml
@@ -0,0 +1,103 @@
+
+
+
+
+
+ SphinxClient::setGroupBy
+ Set grouping attribute
+
+
+
+ &reftitle.description;
+
+ publicboolSphinxClient::setGroupBy
+ stringattribute
+ intfunc
+ stringgroupsort
+
+
+ Sets grouping attribute, function, and group sorting mode, and enables
+ grouping.
+
+
+ Grouping feature is very similar to GROUP BY clause in SQL.
+ Results produced by this function call are going to be the same as produced
+ by the following pseudo code:
+ SELECT ... GROUP BY $func($attribute) ORDER BY $groupsort.
+
+
+
+
+ &reftitle.parameters;
+
+
+
+ attribute
+
+
+ A string containing group-by attribute name.
+
+
+
+
+ func
+
+
+ Constant, which sets a function applied to the attribute value in order
+ to compute group-by key.
+
+
+
+
+ groupsort
+
+
+ An optional clause controlling how the groups are sorted.
+ Defaults to "@group desc".
+
+
+
+
+
+
+
+
+ &reftitle.returnvalues;
+
+ &return.success;
+
+
+
+
+ &reftitle.seealso;
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/reference/sphinx/sphinxclient/setgroupdistinct.xml b/reference/sphinx/sphinxclient/setgroupdistinct.xml
new file mode 100644
index 0000000000..67aa344492
--- /dev/null
+++ b/reference/sphinx/sphinxclient/setgroupdistinct.xml
@@ -0,0 +1,80 @@
+
+
+
+
+
+ SphinxClient::setGroupDistinct
+ Set attribute name for per-group distinct values count calculations
+
+
+
+ &reftitle.description;
+
+ publicboolSphinxClient::setGroupDistinct
+ stringattribute
+
+
+ Sets attribute name for per-group distinct values count calculations. Only
+ available for grouping queries. For each group, all values of
+ attribute will be stored, then the amount of
+ distinct values will be calculated and returned to the client. This feature
+ is similar to COUNT(DISTINCT) clause in SQL.
+
+
+
+
+ &reftitle.parameters;
+
+
+
+ attribute
+
+
+ A string containing group-by attribute name.
+
+
+
+
+
+
+
+
+ &reftitle.returnvalues;
+
+ &return.success;
+
+
+
+
+ &reftitle.seealso;
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/reference/sphinx/sphinxclient/setidrange.xml b/reference/sphinx/sphinxclient/setidrange.xml
new file mode 100644
index 0000000000..b1a6735e78
--- /dev/null
+++ b/reference/sphinx/sphinxclient/setidrange.xml
@@ -0,0 +1,78 @@
+
+
+
+
+
+ SphinxClient::setIDRange
+ Set a range of accepted document IDs
+
+
+
+ &reftitle.description;
+
+ publicboolSphinxClient::setIDRange
+ intmin
+ intmax
+
+
+ Sets an accepted range of document IDs. Default range is from 0 to 0, i.e.
+ no limit. Only those records that have document ID between
+ min and max
+ (including IDs exactly equal to min or
+ max) will be matched.
+
+
+
+
+ &reftitle.parameters;
+
+
+
+ min
+
+
+ Minimum ID value.
+
+
+
+
+ max
+
+
+ Maximum ID value.
+
+
+
+
+
+
+
+
+ &reftitle.returnvalues;
+
+ &return.success;
+
+
+
+
+
+
diff --git a/reference/sphinx/sphinxclient/setindexweights.xml b/reference/sphinx/sphinxclient/setindexweights.xml
new file mode 100644
index 0000000000..2dda0ce0c9
--- /dev/null
+++ b/reference/sphinx/sphinxclient/setindexweights.xml
@@ -0,0 +1,68 @@
+
+
+
+
+
+ SphinxClient::setIndexWeights
+ Set per-index weights
+
+
+
+ &reftitle.description;
+
+ publicboolSphinxClient::setIndexWeights
+ arrayweights
+
+
+ Sets per-index weights and enables weighted summing of match weights across
+ different indexes.
+
+
+
+
+ &reftitle.parameters;
+
+
+
+ weights
+
+
+ An associative array mapping string index names to integer
+ weights. Default is empty array, i.e. weighting summing is disabled.
+
+
+
+
+
+
+
+
+
+ &reftitle.returnvalues;
+
+ &return.success;
+
+
+
+
+
+
diff --git a/reference/sphinx/sphinxclient/setlimits.xml b/reference/sphinx/sphinxclient/setlimits.xml
new file mode 100644
index 0000000000..dc3050ea5a
--- /dev/null
+++ b/reference/sphinx/sphinxclient/setlimits.xml
@@ -0,0 +1,99 @@
+
+
+
+
+
+ SphinxClient::setLimits
+ Set offset and limit of the result set
+
+
+
+ &reftitle.description;
+
+ publicboolSphinxClient::setLimits
+ intoffset
+ intlimit
+ intmax
+ intcutoff
+
+
+ Sets offset into server-side result set and amount
+ of matches to return to client starting from that offset
+ (limit). Can additionally control maximum
+ server-side result set size for current query
+ (max_matches) and the threshold amount of matches
+ to stop searching at (cutoff).
+
+
+
+
+ &reftitle.parameters;
+
+
+
+ offset
+
+
+ Result set offset.
+
+
+
+
+ limit
+
+
+ Amount of matches to return.
+
+
+
+
+ max_matches
+
+
+ Controls how much matches searchd will keep in RAM while searching.
+
+
+
+
+ cutoff
+
+
+ Used for advanced performance control. It tells searchd to forcibly
+ stop search query once cutoff matches have been
+ found and processed.
+
+
+
+
+
+
+
+
+ &reftitle.returnvalues;
+
+ &return.success;
+
+
+
+
+
+
diff --git a/reference/sphinx/sphinxclient/setmatchmode.xml b/reference/sphinx/sphinxclient/setmatchmode.xml
new file mode 100644
index 0000000000..a368e4e588
--- /dev/null
+++ b/reference/sphinx/sphinxclient/setmatchmode.xml
@@ -0,0 +1,118 @@
+
+
+
+
+
+ SphinxClient::setMatchMode
+ Set full-text query matching mode
+
+
+
+ &reftitle.description;
+
+ publicboolSphinxClient::setMatchMode
+ intmode
+
+
+ Sets full-text query matching mode. mode is one of
+ the constants listed below.
+
+ Match modes
+
+
+
+ Constant
+ Description
+
+
+
+
+ SPH_MATCH_ALL
+ Match all query words (default mode).
+
+
+ SPH_MATCH_ANY
+ Match any of query words.
+
+
+ SPH_MATCH_PHRASE
+ Match query as a phrase, requiring perfect match.
+
+
+ SPH_MATCH_BOOLEAN
+ Match query as a boolean expression.
+
+
+ SPH_MATCH_EXTENDED
+ Match query as an expression in Sphinx internal query language.
+
+
+ SPH_MATCH_FULLSCAN
+ Enables fullscan.
+
+
+ SPH_MATCH_EXTENDED2
+ The same as SPH_MATCH_EXTENDED plus ranking
+ and quorum searching support.
+
+
+
+
+
+
+
+
+ &reftitle.parameters;
+
+
+
+ mode
+
+
+ Matching mode.
+
+
+
+
+
+
+
+
+ &reftitle.returnvalues;
+
+ &return.success;
+
+
+
+
+ &reftitle.seealso;
+
+
+
+
+
+
+
+
+
+
+
diff --git a/reference/sphinx/sphinxclient/setmaxquerytime.xml b/reference/sphinx/sphinxclient/setmaxquerytime.xml
new file mode 100644
index 0000000000..fa5b1e8db2
--- /dev/null
+++ b/reference/sphinx/sphinxclient/setmaxquerytime.xml
@@ -0,0 +1,75 @@
+
+
+
+
+
+ SphinxClient::setMaxQueryTime
+ Set maximum query time
+
+
+
+ &reftitle.description;
+
+ publicboolSphinxClient::setMaxQueryTime
+ stringqtime
+
+
+ Sets maximum search query time, in milliseconds. qtime must be a
+ non-negative integer. Default value is 0, i.e. no limit.
+
+
+
+
+ &reftitle.parameters;
+
+
+
+ qtime
+
+
+ Maximum query time, in milliseconds.
+
+
+
+
+
+
+
+
+ &reftitle.returnvalues;
+
+ &return.success;
+
+
+
+
+ &reftitle.seealso;
+
+
+
+
+
+
+
+
+
+
diff --git a/reference/sphinx/sphinxclient/setrankingmode.xml b/reference/sphinx/sphinxclient/setrankingmode.xml
new file mode 100644
index 0000000000..ed0a4ce3fa
--- /dev/null
+++ b/reference/sphinx/sphinxclient/setrankingmode.xml
@@ -0,0 +1,105 @@
+
+
+
+
+
+ SphinxClient::setRankingMode
+ Set ranking mode
+
+
+
+ &reftitle.description;
+
+ publicboolSphinxClient::setRankingMode
+ intranker
+
+
+ Sets ranking mode. Only available in
+ SPH_MATCH_EXTENDED2 matching mode.
+
+ Ranking modes
+
+
+
+ Constant
+ Description
+
+
+
+
+ SPH_RANK_PROXIMITY_BM25
+ Default ranking mode which uses both proximity and BM25
+ ranking.
+
+
+ SPH_RANK_BM25
+ Statistical ranking mode which uses BM25 ranking only (similar
+ to most of other full-text engines). This mode is faster, but may result
+ in worse quality on queries which contain more than 1 keyword.
+
+
+ SPH_RANK_NONE
+ Disables ranking. This mode is the fastest. It is essentially
+ equivalent to boolean searching, a weight of 1 is assigned to all
+ matches.
+
+
+
+
+
+
+
+
+ &reftitle.parameters;
+
+
+
+ ranker
+
+
+ Ranking mode.
+
+
+
+
+
+
+
+
+ &reftitle.returnvalues;
+
+ &return.success;
+
+
+
+
+ &reftitle.seealso;
+
+
+
+
+
+
+
+
+
+
diff --git a/reference/sphinx/sphinxclient/setretries.xml b/reference/sphinx/sphinxclient/setretries.xml
new file mode 100644
index 0000000000..4f1b149b83
--- /dev/null
+++ b/reference/sphinx/sphinxclient/setretries.xml
@@ -0,0 +1,84 @@
+
+
+
+
+
+ SphinxClient::setRetries
+ Set retry count and delay
+
+
+
+ &reftitle.description;
+
+ publicboolSphinxClient::setRetries
+ intcount
+ intdelay
+
+
+ Sets distributed retry count and delay.
+
+
+ On temporary failures searchd will attempt up to
+ count retries per agent.
+ delay is the delay between the retries,
+ in milliseconds. Retries are disabled by default.
+ Note that this call will not make the API itself retry
+ on temporary failure; it only tells searchd to do so.
+
+
+
+
+ &reftitle.parameters;
+
+
+
+ count
+
+
+ Number of retries.
+
+
+
+
+
+
+ delay
+
+
+ Delay between retries, in milliseconds.
+
+
+
+
+
+
+
+
+ &reftitle.returnvalues;
+
+ &return.success;
+
+
+
+
+
+
diff --git a/reference/sphinx/sphinxclient/setserver.xml b/reference/sphinx/sphinxclient/setserver.xml
new file mode 100644
index 0000000000..75ac2d5d75
--- /dev/null
+++ b/reference/sphinx/sphinxclient/setserver.xml
@@ -0,0 +1,76 @@
+
+
+
+
+
+ SphinxClient::setServer
+ Set searchd host and port
+
+
+
+ &reftitle.description;
+
+ publicboolSphinxClient::setServer
+ stringserver
+ intport
+
+
+ Sets searchd host name and TCP port. All subsequent requests will use the
+ new host and port settings. Default host and port are 'localhost' and 3312,
+ respectively.
+
+
+
+
+ &reftitle.parameters;
+
+
+
+ server
+
+
+ IP or hostname.
+
+
+
+
+ port
+
+
+ Port number.
+
+
+
+
+
+
+
+
+ &reftitle.returnvalues;
+
+ &return.success;
+
+
+
+
+
+
diff --git a/reference/sphinx/sphinxclient/setsortmode.xml b/reference/sphinx/sphinxclient/setsortmode.xml
new file mode 100644
index 0000000000..d86977ea29
--- /dev/null
+++ b/reference/sphinx/sphinxclient/setsortmode.xml
@@ -0,0 +1,123 @@
+
+
+
+
+
+ SphinxClient::setSortMode
+ Set matches sorting mode
+
+
+
+ &reftitle.description;
+
+ publicboolSphinxClient::setSortMode
+ intmode
+ stringsortby
+
+
+ Sets matches sorting mode. See available modes below.
+
+ Sorting modes
+
+
+
+ Constant
+ Description
+
+
+
+
+ SPH_SORT_RELEVANCE
+ Sort by relevance in descending order (best matches first).
+
+
+ SPH_SORT_ATTR_DESC
+ Sort by an attribute in descending order (bigger attribute
+ values first).
+
+
+ SPH_SORT_ATTR_ASC
+ Sort by an attribute in ascending order (smaller attribute
+ values first).
+
+
+ SPH_SORT_TIME_SEGMENTS
+ Sort by time segments (last hour/day/week/month) in descending
+ order, and then by relevance in descending order.
+
+
+ SPH_SORT_EXTENDED
+ Sort by SQL-like combination of columns in ASC/DESC order.
+
+
+ SPH_SORT_EXPR
+ Sort by an arithmetic expression.
+
+
+
+
+
+
+
+
+ &reftitle.parameters;
+
+
+
+ mode
+
+
+ Sorting mode.
+
+
+
+
+ sortby
+
+
+
+
+
+
+
+
+
+
+ &reftitle.returnvalues;
+
+ &return.success;
+
+
+
+
+ &reftitle.seealso;
+
+
+
+
+
+
+
+
+
+
+
diff --git a/reference/sphinx/sphinxclient/updateattributes.xml b/reference/sphinx/sphinxclient/updateattributes.xml
new file mode 100644
index 0000000000..d97e6c19ea
--- /dev/null
+++ b/reference/sphinx/sphinxclient/updateattributes.xml
@@ -0,0 +1,85 @@
+
+
+
+
+
+ SphinxClient::updateAttributes
+ Updates document attributes
+
+
+
+ &reftitle.description;
+
+ publicintSphinxClient::updateAttributes
+ stringindex
+ arrayattributes
+ arrayvalues
+
+
+ Instantly updates given attribute values in given documents.
+
+
+
+
+ &reftitle.parameters;
+
+
+
+ index
+
+
+ Name of the index (or indexes) to be updated.
+
+
+
+
+ attributes
+
+
+ Array of attribute names, listing attributes that are updated.
+
+
+
+
+ values
+
+
+ Associative array containing document IDs as keys and array of
+ attribute values as values.
+
+
+
+
+
+
+
+
+ &reftitle.returnvalues;
+
+ Returns number of actually updated documents (0 or more) on success, or
+ &false; on failure.
+
+
+
+
+
+