Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Add a number of methods; nearing workable state

  • Loading branch information...
commit 617180d7780d9cddfbdbb10d820aee9108a7a0fe 1 parent 43f391d
Thijs Oppermann authored
View
305 cl-sphinx-search.lisp
@@ -160,9 +160,9 @@
:initarg :retry-delay
:initform 0
:documentation "distributed retry delay")
- (anchor
- :accessor anchor
- :initarg :anchor
+ (geo-anchor
+ :accessor geo-anchor
+ :initarg :geo-anchor
:initform ()
:documentation "geographical anchor point; fixed length list with '(attrlat lat attrlon lon)")
(index-weights
@@ -188,8 +188,8 @@
(overrides
:accessor overrides
:initarg :overrides
- :initform (make-hash-table)
- :documentation "per-query attribute values overrides")
+ :initform ()
+ :documentation "per-query attribute value overrides")
(select
:accessor select
:initarg :select
@@ -371,15 +371,6 @@
client)
-;; (let ((filter (make-hash-table)))
-;; (setf (gethash 'type filter) +sph-filter-values+)
-;; (setf (gethash 'attr filter) attr)
-;; (setf (gethash 'values filter) values)
-;; (setf (gethash 'exclude filter) (cond (exclude 1)
-;; (t 0)))
-;; (push filter (filters client))
-;; client))
-
(defgeneric set-filter-range (client attribute min max &key exclude)
(:documentation
"@arg[client]{a @class{sphinx-client}}
@@ -410,16 +401,6 @@
(defmethod set-filter-range ((client sphinx-client) attr min max &key (exclude ()))
(%set-filter-range client +sph-filter-range+ attr min max :exclude exclude))
-;; (assert (and (numberp min) (numberp max) (>= max min)))
-;; (let ((filter (make-hash-table)))
-;; (setf (gethash 'type filter) +sph-filter-range+)
-;; (setf (gethash 'attr filter) attr)
-;; (setf (gethash 'min filter) min)
-;; (setf (gethash 'max filter) max)
-;; (setf (gethash 'exclude filter) (cond (exclude 1)
-;; (t 0)))
-;; (push filter (filters client))
-;; client))
(defgeneric set-filter-float-range (client attribute min max &key exclude)
(:documentation
@@ -456,28 +437,249 @@
(push `(,type ,attr ,min ,max ,(cond (exclude 1) (t 0))) (filters client))
client)
-;; (let ((filter (make-hash-table)))
-;; (setf (gethash 'type filter) type)
-;; (setf (gethash 'attr filter) attr)
-;; (setf (gethash 'min filter) min)
-;; (setf (gethash 'max filter) max)
-;; (setf (gethash 'exclude filter) (cond (exclude 1)
-;; (t 0)))
-;; (push filter (filters client))
-;; client))
-
-;; (defgeneric (client )
-;; (:documentation
-;; "@arg[client]{a @class{sphinx-client}}
-;; @arg[]{}
-;; @return{}
-;; @short{.}
-
-;; .
-;; "))
-
-;; (defmethod ((client sphinx-client) )
-;; )
+
+(defgeneric set-geo-anchor (client latitude-attribute latitude longitude-attribute longitude)
+ (:documentation
+ "@arg[client]{a @class{sphinx-client}}
+ @arg[latitude-attribute]{the latitude attribute name}
+ @arg[latitude]{latitude in radians}
+ @arg[longitude-attribute]{the longitude attribute name}
+ @arg[longitude]{longitude in radians}
+ @return{client}
+ @short{Setup anchor point for geolocation.}
+
+ @begin{pre}
+ (set-geo-anchor client \"latitude_attr\" 45.231 \"longitude_attribute\" 4.5)
+ @end{pre}
+
+ Setup anchor point for using geosphere distance calculations in
+ filters and sorting. Distance will be computed with respect to
+ this point, and will be included in result output.
+
+ To actually use this to filter on results a certain distance from
+ the anchor point, use something like:
+
+ @begin{pre}
+ (set-filter-float-range sph \"geodist\" 0 5000)
+ @end{pre}
+
+ This will filter the results to be closer than 5 km from the anchor
+ point.
+"))
+
+(defmethod set-geo-anchor ((client sphinx-client) lat-attr lat lon-attr lon)
+ (assert (and (stringp lat-attr) (stringp lon-attr) (numberp lat) (numberp lon)))
+ (setf (geo-anchor client) (list lat-attr lat lon-attr lon))
+ client)
+
+
+(defgeneric set-group-by (client attribute function &optional group-sort)
+ (:documentation
+ "@arg[client]{a @class{sphinx-client}}
+ @arg[attribute]{the attribute name to group by}
+ @arg[function]{the grouping function to use}
+ @arg[group-sort]{the sorting clause for group-by}
+ @return{client}
+ @short{Set grouping options.}
+
+ @begin{pre}
+ (set-group-by client \"whatever_attr\" +sph-groupby-attr+ \"group asc\")
+ (set-group-by client \"date_attr\" +sph-groupby-day+)
+ @end{pre}
+
+ Sets attribute and function of results grouping.
+
+ In grouping mode, all matches are assigned to different groups based on
+ grouping function value. Each group keeps track of the total match
+ count, and the best match (in this group) according to current sorting
+ function. The final result set contains one best match per group, with
+ grouping function value and matches count attached.
+
+ @code{attribute} is any valid attribute. Use @fun{reset-group-by}
+ to disable grouping.
+
+ @code{function} is one of:
+
+ @begin{dl}
+ @dt[+sph-groupby-day+]{Group by day (assumes timestamp type attribute
+ of form YYYYMMDD)}
+ @dt[+sph-groupby-week+]{Group by week (assumes timestamp type attribute
+ of form YYYYNNN)}
+ @dt[+sph-groupby-month+]{Group by month (assumes timestamp type
+ attribute of form YYYYMM)}
+ @dt[+sph-groupby-year+]{Group by year (assumes timestamp type attribute
+ of form YYYY)}
+ @dt[+sph-groupby-attr+]{Group by attribute value}
+ @dt[+sph-groupby-attrpair+]{Group by two attributes, being the given
+ attribute and the attribute that immediately follows it in the sequence
+ of indexed attributes. The specified attribute may therefore not be the
+ last of the indexed attributes}
+ @end{dl}
+
+ Groups in the set of results can be sorted by any SQL-like sorting clause,
+ including both document attributes and the following special internal
+ Sphinx attributes:
+
+ @begin{dl}
+ @dt[id]{document ID}
+ @dt[weight, rank, relevance]{match weight}
+ @dt[group]{group by function value}
+ @dt[count]{number of matches in group}
+ @end{dl}
+
+ The default mode is to sort by group-by value in descending order,
+ ie. by \"group desc\".
+
+ In the results set, @code{total-found} contains the total amount of
+ matching groups over the whole index.
+
+ WARNING: grouping is done in fixed memory and thus its results
+ are only approximate; so there might be more groups reported
+ in @code{total-found} than actually present. @code{count} might
+ also be underestimated.
+
+ For example, if sorting by relevance and grouping by a \"published\"
+ attribute with +sph-groupby-day+ function, then the result set will
+ contain only the most relevant match for each day when there were any
+ matches published, with day number and per-day match count attached,
+ and sorted by day number in descending order (ie. recent days first).
+"))
+
+(defmethod set-group-by ((client sphinx-client) attr func &optional sort)
+ (assert (and (stringp attr) (stringp sort) (find func +sph-sort-functions+)))
+ (setf (group-by client) attr)
+ (setf (group-function client) func)
+ (setf (group-sort client) sort)
+ client)
+
+
+(defgeneric set-group-distinct (client attribute)
+ (:documentation
+ "@arg[client]{a @class{sphinx-client}}
+ @arg[attribute]{the attribute to use for count-distinct queries}
+ @return{client}
+ @short{Set count-distinct attribute for group-by queries.}
+"))
+
+(defmethod set-group-distinct ((client sphinx-client) attribute)
+ (assert (stringp attribute))
+ (setf (group-distinct client) attribute)
+ client)
+
+
+(defgeneric set-override (client attribute type values)
+ (:documentation
+ "@arg[client]{a @class{sphinx-client}}
+ @arg[attribute]{the attribute to override}
+ @arg[type]{the attribute type as defined in Sphinx config}
+ @arg[values]{an alist mapping document IDs to attribute values}
+ @return{client}
+ @short{Set attribute values overrides.}
+
+ There can be only one override per attribute.
+
+ @code{values} must be an alist that maps document IDs to attribute
+ values.
+
+ @begin{pre}
+ (set-override client \"test_attr\" +sph-attr-integer+ '((4314 . 3) (2443 . 2)))
+ @end{pre}
+
+ In the example above, for the document with ID 4314, Sphinx will see an
+ attribute value for the @code{attribute} called 'test_attr' of 3. And
+ for the document with ID 2443 it will see 2, while the rest will be what
+ it was when the indexer was last run.
+"))
+
+(defmethod set-override ((client sphinx-client) attribute type values)
+ (assert (and (stringp attribute) (find type +sph-attr-types+) (listp values)))
+ (push (cons attribute values) (overrides client))
+ client)
+
+
+(defgeneric set-select (client select)
+ (:documentation
+ "@arg[client]{a @class{sphinx-client}}
+ @arg[select]{the select string}
+ @return{client}
+ @short{Set the select clause.}
+
+ Sets the select clause, listing specific attributes to fetch, and
+ expressions to compute and fetch. Clause syntax mimics SQL.
+
+ The select clause is very similar to the part of a typical SQL query
+ between @code{SELECT} and @code{FROM}. It lets you choose what
+ attributes (columns) to fetch, and also what expressions over the
+ columns to compute and fetch. A difference from SQL is that expressions
+ must always be aliased to a correct identifier (consisting of letters
+ and digits) using the 'AS' keyword. Sphinx enforces aliases so that the
+ computation results can be returned under a 'normal' name in the result
+ set, used in other clauses, etc.
+
+ Everything else is basically identical to SQL. Star ('*') is supported.
+ Functions are supported. Arbitrary amount of expressions is supported.
+ Computed expressions can be used for sorting, filtering, and grouping,
+ just as the regular attributes.
+
+ Aggregate functions (AVG(), MIN(), MAX(), SUM()) are supported when
+ using GROUP BY.
+
+ Examples:
+
+ @begin{pre}
+ (set-select sph \"*, (user_karma+ln(pageviews))*0.1 AS myweight\" )
+ (set-select sph \"exp_years, salary_gbp*{$gbp_usd_rate@} AS salary_usd, IF(age>40,1,0) AS over40\" )
+ (set-select sph \"*, AVG(price) AS avgprice\" )
+ @end{pre}
+"))
+
+(defmethod set-select ((client sphinx-client) select)
+ (assert (stringp select))
+ (setf (select client) select)
+ client)
+
+
+(defgeneric reset-filters (client)
+ (:documentation
+ "@arg[client]{a @class{sphinx-client}}
+ @return{client}
+ @short{Reset the filters.}
+
+ Clear all filters, including the geolocation anchor point.
+"))
+
+(defmethod reset-filters ((client sphinx-client))
+ (setf (filters client) ())
+ (setf (geo-anchor client) ())
+ client)
+
+
+(defgeneric reset-group-by (client)
+ (:documentation
+ "@arg[client]{a @class{sphinx-client}}
+ @return{client}
+ @short{Clear all the group-by settings.}
+"))
+
+(defmethod reset-group-by ((client sphinx-client))
+ (setf (group-by client) "")
+ (setf (group-function client) +sph-groupby-day+)
+ (setf (group-sort client) "@group desc")
+ (setf (group-distinct client) "")
+ client)
+
+
+(defgeneric reset-overrides (client)
+ (:documentation
+ "@arg[client]{a @class{sphinx-client}}
+ @return{client}
+ @short{Clear all attribute value overrides.}
+"))
+
+(defmethod reset-overrides ((client sphinx-client))
+ (setf (overrides client) ())
+ client)
+
(defgeneric query (client query &key index comment)
(:documentation
@@ -622,12 +824,12 @@
(pack "N/a*" (group-sort client))
(pack "NNN" (cutoff client) (retry-count client) (retry-delay client))
(pack "N/a*" (group-distinct client))
- (cond ((anchor client)
+ (cond ((geo-anchor client)
(concatenate 'string
- (pack "N/a*" (first (anchor client)))
- (pack "N/a*" (third (anchor client)))
- (%pack-float (second (anchor client)))
- (%pack-float (fourth (anchor client)))))
+ (pack "N/a*" (first (geo-anchor client)))
+ (pack "N/a*" (third (geo-anchor client)))
+ (%pack-float (second (geo-anchor client)))
+ (%pack-float (fourth (geo-anchor client)))))
(t
(pack "N" 0)))
(%pack-hash (index-weights client))
@@ -965,4 +1167,3 @@
(defun %pack-float (float-value)
(pack "N" (unpack "L*" (pack "f" float-value))))
-
View
7 constants.lisp
@@ -95,3 +95,10 @@
(defconstant +sph-groupby-attr+ 4)
(defconstant +sph-groupby-attrpair+ 5)
+(define-constant +sph-sort-functions+ (list +sph-groupby-day+
+ +sph-groupby-week+
+ +sph-groupby-month+
+ +sph-groupby-year+
+ +sph-groupby-attr+
+ +sph-groupby-attrpair+))
+
View
116 doc/.atdoc.xml
@@ -24,7 +24,18 @@
Sphinx version 0.9.7-rc1, by Len Kranendonk, which was in turn
based on the Sphinx PHP API. </pre><break/>
Also used was the api for python which was supplied with the source code download for Sphinx Search v0.9.9-rc2, in the <code>api/</code> directory.<break/> <b>Documentation</b><break/> This documentation was generated by <a a="http://www.lichteblau.com/atdoc/doc/">atdoc</a>,
- the documentation generation system written by David Lichteblau.<break/> </section><break/></documentation-string><external-symbols><function-definition id="cl-sphinx-search__fun__set-filter-float-range" name="set-filter-float-range" package="cl-sphinx-search"><lambda-list><elt>client</elt><elt>attribute</elt><elt>min</elt><elt>max</elt><elt>&amp;key</elt><elt>exclude</elt></lambda-list><documentation-string><arg arg="client">a <class id="cl-sphinx-search__class__sphinx-client">sphinx-client</class></arg> <arg arg="attribute">the attribute to filter on</arg> <arg arg="min">start of the range to filter on</arg> <arg arg="max">end of the range to filter on</arg> <arg arg="exclude">if set, exclude the given range</arg> <return>client</return> <short>Sets the results to be filtered on the given range.</short><break/> <pre>
+ the documentation generation system written by David Lichteblau.<break/> </section></documentation-string><external-symbols><function-definition id="cl-sphinx-search__fun__reset-group-by" name="reset-group-by" package="cl-sphinx-search"><lambda-list><elt>client</elt></lambda-list><documentation-string><arg arg="client">a <class id="cl-sphinx-search__class__sphinx-client">sphinx-client</class></arg> <return>client</return> <short>Clear all the group-by settings.</short></documentation-string></function-definition><function-definition id="cl-sphinx-search__fun__set-id-range" name="set-id-range" package="cl-sphinx-search"><lambda-list><elt>client</elt><elt>min</elt><elt>max</elt></lambda-list><documentation-string><arg arg="client">a <class id="cl-sphinx-search__class__sphinx-client">sphinx-client</class></arg> <arg arg="min">minimum id to start searching from</arg> <arg arg="max">maximum id to stop searching at</arg> <return>client</return> <short>Set the id-range to search within (inclusive).</short><break/>
+ Set the range of id's within which to search. Range is inclusive, so setting
+ [0, 450] both 0 and 450 id's will be found.</documentation-string></function-definition><function-definition id="cl-sphinx-search__fun__set-geo-anchor" name="set-geo-anchor" package="cl-sphinx-search"><lambda-list><elt>client</elt><elt>latitude-attribute</elt><elt>latitude</elt><elt>longitude-attribute</elt><elt>longitude</elt></lambda-list><documentation-string><arg arg="client">a <class id="cl-sphinx-search__class__sphinx-client">sphinx-client</class></arg> <arg arg="latitude-attribute">the latitude attribute name</arg> <arg arg="latitude">latitude in radians</arg> <arg arg="longitude-attribute">the longitude attribute name</arg> <arg arg="longitude">longitude in radians</arg> <return>client</return> <short>Setup anchor point for geolocation.</short><break/> <pre>
+ (set-geo-anchor client "latitude_attr" 45.231 "longitude_attribute" 4.5) </pre><break/>
+ Setup anchor point for using geosphere distance calculations in
+ filters and sorting. Distance will be computed with respect to
+ this point, and will be included in result output.<break/>
+ To actually use this to filter on results a certain distance from
+ the anchor point, use something like:<break/> <pre>
+ (set-filter-float-range sph "geodist" 0 5000) </pre><break/>
+ This will filter the results to be closer than 5 km from the anchor
+ point.</documentation-string></function-definition><function-definition id="cl-sphinx-search__fun__set-filter-float-range" name="set-filter-float-range" package="cl-sphinx-search"><lambda-list><elt>client</elt><elt>attribute</elt><elt>min</elt><elt>max</elt><elt>&amp;key</elt><elt>exclude</elt></lambda-list><documentation-string><arg arg="client">a <class id="cl-sphinx-search__class__sphinx-client">sphinx-client</class></arg> <arg arg="attribute">the attribute to filter on</arg> <arg arg="min">start of the range to filter on</arg> <arg arg="max">end of the range to filter on</arg> <arg arg="exclude">if set, exclude the given range</arg> <return>client</return> <short>Sets the results to be filtered on the given range.</short><break/> <pre>
(set-filter-float-range client "filter_attr" 45.231 99)
(set-filter-float-range client "other_attr" 1.32 55.0031 :exclude t) </pre><break/>
Sets the results to be filtered on a range of values for the given
@@ -32,24 +43,22 @@
will be returned.<break/>
This may be called multiple times with different attributes to
select on multiple attributes.<break/> If <code>:exclude</code> is set, excludes results that fall within the
- given range.</documentation-string></function-definition><function-definition id="cl-sphinx-search__fun__set-server" name="set-server" package="cl-sphinx-search"><lambda-list><elt>client</elt><elt>&amp;key</elt><elt>host</elt><elt>port</elt><elt>path</elt></lambda-list><documentation-string><arg arg="client">a <class id="cl-sphinx-search__class__sphinx-client">sphinx-client</class></arg> <arg arg="host">the host to connect to when using an INET socket</arg> <arg arg="port">the port to connect to when using an INET socket</arg> <arg arg="path">the path to the unix domain socket when not using INET</arg> <return>client</return> <short>Set the server host:port or path to connect to.</short><break/> <pre>
- (set-server client :host host :port port)
- (set-server client :path unix-path) </pre><break/> In the first form, sets the <code>host</code> (string) and <code>port</code> (integer)
- details for the searchd server using a network (INET) socket.<break/> In the second form, where <code>unix-path</code> is a local filesystem path
- (optionally prefixed by 'unix://'), sets the client to access the
- searchd server via a local (UNIX domain) socket at the specified path.</documentation-string></function-definition><function-definition id="cl-sphinx-search__fun__query" name="query" package="cl-sphinx-search"><lambda-list><elt>client</elt><elt>query</elt><elt>&amp;key</elt><elt>index</elt><elt>comment</elt></lambda-list><documentation-string><arg arg="client">a <class id="cl-sphinx-search__class__sphinx-client">sphinx-client</class></arg> <arg arg="query">the query to run through <code>searchd</code></arg> <arg arg="index">the index to use; defaults to "*"</arg> <arg arg="comment">a comment describing this query; default none</arg> <return>nil or a hash containing the query results</return> <short>Run a query through <code>searchd</code>.</short><break/> <pre>
+ given range.</documentation-string></function-definition><function-definition id="cl-sphinx-search__fun__set-filter" name="set-filter" package="cl-sphinx-search"><lambda-list><elt>client</elt><elt>attribute</elt><elt>values-list</elt><elt>&amp;key</elt><elt>exclude</elt></lambda-list><documentation-string><arg arg="client">a <class id="cl-sphinx-search__class__sphinx-client">sphinx-client</class></arg> <arg arg="attribute">the attribute to filter on</arg> <arg arg="values-list">the numeric values to filter on</arg> <arg arg="exclude">if set, exclude the given values</arg> <return>client</return> <short>Sets the results to be filtered on the given attribute.</short><break/> <pre>
+ (set-filter client "filter_attr" '(0 2 4 34 55 77))
+ (set-filter client "other_attr" '(8 4 2 11) :exclude t) </pre><break/>
+ Sets the results to be filtered on the given attribute. Only
+ results which have attributes matching the given (numeric)
+ values will be returned.<break/>
+ This may be called multiple times with different attributes to
+ select on multiple attributes.<break/> If <code>:exclude</code> is set, excludes results that match the filter.</documentation-string></function-definition><function-definition id="cl-sphinx-search__fun__query" name="query" package="cl-sphinx-search"><lambda-list><elt>client</elt><elt>query</elt><elt>&amp;key</elt><elt>index</elt><elt>comment</elt></lambda-list><documentation-string><arg arg="client">a <class id="cl-sphinx-search__class__sphinx-client">sphinx-client</class></arg> <arg arg="query">the query to run through <code>searchd</code></arg> <arg arg="index">the index to use; defaults to "*"</arg> <arg arg="comment">a comment describing this query; default none</arg> <return>nil or a hash containing the query results</return> <short>Run a query through <code>searchd</code>.</short><break/> <pre>
(query client "test") </pre><break/> Query <code>searchd</code>. This method runs a single query through <code>searchd</code>.<break/>
- It returns the results in a hash with the following keys: <dl> <dt dt="attributes">a hash-table containing attributes</dt> <dt dt="fields">a list of fields</dt> <dt dt="matches">a hash-table containing the matches</dt> <dt dt="status">the status returned by <code>searchd</code></dt> <dt dt="status-message">the status message returned by <code>searchd</code></dt> <dt dt="time">the time <code>searchd</code> took for the query</dt> <dt dt="total">the total matches returned</dt> <dt dt="total-found">the total number of matches found</dt> <dt dt="words">a hash-table containing the matching words with their statistics</dt> </dl><break/> <see id="cl-sphinx-search__fun__add-query">add-query</see> <see id="cl-sphinx-search__fun__run-queries">run-queries</see><break/></documentation-string></function-definition><function-definition id="cl-sphinx-search__fun__set-limits" name="set-limits" package="cl-sphinx-search"><lambda-list><elt>client</elt><elt>&amp;key</elt><elt>offset</elt><elt>limit</elt><elt>max</elt><elt>cutoff</elt></lambda-list><documentation-string><arg arg="client">a <class id="cl-sphinx-search__class__sphinx-client">sphinx-client</class></arg> <arg arg="offset">the offset to start returning matches from</arg> <arg arg="limit">how many matches to return starting from <code>offset</code></arg> <arg arg="max">maximum number of matches to return</arg> <arg arg="cutoff">the cutoff to stop searching at</arg> <return>client</return> <short>Set the offset, limit, cutoff and max matches to return.</short><break/> <pre>
- (set-limits client :limit limit)
- (set-limits client :offset offset :limit limit)
- (set-limits client :offset offset :limit limit :max max-matches) </pre><break/>
- Set limit of matches to return. Defaults to offset 0 and 1000 max matches.</documentation-string></function-definition><function-definition id="cl-sphinx-search__fun__run-queries" name="run-queries" package="cl-sphinx-search"><lambda-list><elt>client</elt></lambda-list><documentation-string><arg arg="client">a <class id="cl-sphinx-search__class__sphinx-client">sphinx-client</class></arg> <return>nil or a list of hashes</return> <short>Run the queries added with <code>add-query</code> through <code>searchd</code>.</short><break/> <pre>
+ It returns the results in a hash with the following keys: <dl> <dt dt="attributes">a hash-table containing attributes</dt> <dt dt="fields">a list of fields</dt> <dt dt="matches">a hash-table containing the matches</dt> <dt dt="status">the status returned by <code>searchd</code></dt> <dt dt="status-message">the status message returned by <code>searchd</code></dt> <dt dt="time">the time <code>searchd</code> took for the query</dt> <dt dt="total">the total matches returned</dt> <dt dt="total-found">the total number of matches found</dt> <dt dt="words">a hash-table containing the matching words with their statistics</dt> </dl><break/> <see id="cl-sphinx-search__fun__add-query">add-query</see> <see id="cl-sphinx-search__fun__run-queries">run-queries</see><break/></documentation-string></function-definition><function-definition id="cl-sphinx-search__fun__run-queries" name="run-queries" package="cl-sphinx-search"><lambda-list><elt>client</elt></lambda-list><documentation-string><arg arg="client">a <class id="cl-sphinx-search__class__sphinx-client">sphinx-client</class></arg> <return>nil or a list of hashes</return> <short>Run the queries added with <code>add-query</code> through <code>searchd</code>.</short><break/> <pre>
(add-query client "test")
(add-query client "word")
(run-queries client) </pre><break/> Query <code>searchd</code> with the collected queries added with <code>add-query</code>.<break/>
It returns a list of hashes containing the result of each query. Each hash
- has the following keys: <dl> <dt dt="attributes">a hash-table containing attributes</dt> <dt dt="fields">a list of fields</dt> <dt dt="matches">a hash-table containing the matches</dt> <dt dt="status">the status returned by <code>searchd</code></dt> <dt dt="status-message">the status message returned by <code>searchd</code></dt> <dt dt="time">the time <code>searchd</code> took for the query</dt> <dt dt="total">the total matches returned</dt> <dt dt="total-found">the total number of matches found</dt> <dt dt="words">a hash-table containing the matching words with their statistics</dt> </dl><break/> <see id="cl-sphinx-search__fun__query">query</see> <see id="cl-sphinx-search__fun__add-query">add-query</see><break/></documentation-string></function-definition><function-definition id="cl-sphinx-search__fun__max-query-time" name="max-query-time" package="cl-sphinx-search"><lambda-list><elt>client</elt></lambda-list><documentation-string><arg arg="client">a <class id="cl-sphinx-search__class__sphinx-client">sphinx-client</class></arg> <return>a number; the max query time in milliseconds.</return><break/>
- Get the max query time.</documentation-string></function-definition><function-definition id="cl-sphinx-search__fun__add-query" name="add-query" package="cl-sphinx-search"><lambda-list><elt>client</elt><elt>query</elt><elt>&amp;key</elt><elt>index</elt><elt>comment</elt></lambda-list><documentation-string><arg arg="client">a <class id="cl-sphinx-search__class__sphinx-client">sphinx-client</class></arg> <arg arg="query">the query to run through <code>searchd</code></arg> <arg arg="index">the index to use; defaults to "*"</arg> <arg arg="comment">a comment describing this query; default none</arg> <return>length of query queue</return> <short>Add a query to a batch request.</short><break/> <pre>
+ has the following keys: <dl> <dt dt="attributes">a hash-table containing attributes</dt> <dt dt="fields">a list of fields</dt> <dt dt="matches">a hash-table containing the matches</dt> <dt dt="status">the status returned by <code>searchd</code></dt> <dt dt="status-message">the status message returned by <code>searchd</code></dt> <dt dt="time">the time <code>searchd</code> took for the query</dt> <dt dt="total">the total matches returned</dt> <dt dt="total-found">the total number of matches found</dt> <dt dt="words">a hash-table containing the matching words with their statistics</dt> </dl><break/> <see id="cl-sphinx-search__fun__query">query</see> <see id="cl-sphinx-search__fun__add-query">add-query</see><break/></documentation-string></function-definition><function-definition id="cl-sphinx-search__fun__reset-filters" name="reset-filters" package="cl-sphinx-search"><lambda-list><elt>client</elt></lambda-list><documentation-string><arg arg="client">a <class id="cl-sphinx-search__class__sphinx-client">sphinx-client</class></arg> <return>client</return> <short>Reset the filters.</short><break/>
+ Clear all filters, including the geolocation anchor point.</documentation-string></function-definition><function-definition id="cl-sphinx-search__fun__add-query" name="add-query" package="cl-sphinx-search"><lambda-list><elt>client</elt><elt>query</elt><elt>&amp;key</elt><elt>index</elt><elt>comment</elt></lambda-list><documentation-string><arg arg="client">a <class id="cl-sphinx-search__class__sphinx-client">sphinx-client</class></arg> <arg arg="query">the query to run through <code>searchd</code></arg> <arg arg="index">the index to use; defaults to "*"</arg> <arg arg="comment">a comment describing this query; default none</arg> <return>length of query queue</return> <short>Add a query to a batch request.</short><break/> <pre>
(add-query client "test")
(add-query client "word" :index "*")
(run-queries client) </pre><break/>
@@ -59,7 +68,14 @@
full-text search and ranking operation only once, but compute
multiple group-by results from its output.<break/>
It returns the new length of the query queue, which is also the index
- of the newly added query in the queue.<break/> <see id="cl-sphinx-search__fun__query">query</see> <see id="cl-sphinx-search__fun__run-queries">run-queries</see><break/></documentation-string></function-definition><function-definition id="cl-sphinx-search__fun__set-filter-range" name="set-filter-range" package="cl-sphinx-search"><lambda-list><elt>client</elt><elt>attribute</elt><elt>min</elt><elt>max</elt><elt>&amp;key</elt><elt>exclude</elt></lambda-list><documentation-string><arg arg="client">a <class id="cl-sphinx-search__class__sphinx-client">sphinx-client</class></arg> <arg arg="attribute">the attribute to filter on</arg> <arg arg="min">start of the range to filter on</arg> <arg arg="max">end of the range to filter on</arg> <arg arg="exclude">if set, exclude the given range</arg> <return>client</return> <short>Sets the results to be filtered on the given range.</short><break/> <pre>
+ of the newly added query in the queue.<break/> <see id="cl-sphinx-search__fun__query">query</see> <see id="cl-sphinx-search__fun__run-queries">run-queries</see><break/></documentation-string></function-definition><function-definition id="cl-sphinx-search__fun__last-error" name="last-error" package="cl-sphinx-search"><lambda-list><elt>client</elt></lambda-list><documentation-string><arg arg="client">a <class id="cl-sphinx-search__class__sphinx-client">sphinx-client</class></arg> <return>a string; the last error message returned from the <code>searchd</code>.</return><break/>
+ Get the last error message sent by searchd.</documentation-string></function-definition><function-definition id="cl-sphinx-search__fun__reset-overrides" name="reset-overrides" package="cl-sphinx-search"><lambda-list><elt>client</elt></lambda-list><documentation-string><arg arg="client">a <class id="cl-sphinx-search__class__sphinx-client">sphinx-client</class></arg> <return>client</return> <short>Clear all attribute value overrides.</short></documentation-string></function-definition><function-definition id="cl-sphinx-search__fun__max-query-time" name="max-query-time" package="cl-sphinx-search"><lambda-list><elt>client</elt></lambda-list><documentation-string><arg arg="client">a <class id="cl-sphinx-search__class__sphinx-client">sphinx-client</class></arg> <return>a number; the max query time in milliseconds.</return><break/>
+ Get the max query time.</documentation-string></function-definition><function-definition id="cl-sphinx-search__fun__set-server" name="set-server" package="cl-sphinx-search"><lambda-list><elt>client</elt><elt>&amp;key</elt><elt>host</elt><elt>port</elt><elt>path</elt></lambda-list><documentation-string><arg arg="client">a <class id="cl-sphinx-search__class__sphinx-client">sphinx-client</class></arg> <arg arg="host">the host to connect to when using an INET socket</arg> <arg arg="port">the port to connect to when using an INET socket</arg> <arg arg="path">the path to the unix domain socket when not using INET</arg> <return>client</return> <short>Set the server host:port or path to connect to.</short><break/> <pre>
+ (set-server client :host host :port port)
+ (set-server client :path unix-path) </pre><break/> In the first form, sets the <code>host</code> (string) and <code>port</code> (integer)
+ details for the searchd server using a network (INET) socket.<break/> In the second form, where <code>unix-path</code> is a local filesystem path
+ (optionally prefixed by 'unix://'), sets the client to access the
+ searchd server via a local (UNIX domain) socket at the specified path.</documentation-string></function-definition><function-definition id="cl-sphinx-search__fun__set-filter-range" name="set-filter-range" package="cl-sphinx-search"><lambda-list><elt>client</elt><elt>attribute</elt><elt>min</elt><elt>max</elt><elt>&amp;key</elt><elt>exclude</elt></lambda-list><documentation-string><arg arg="client">a <class id="cl-sphinx-search__class__sphinx-client">sphinx-client</class></arg> <arg arg="attribute">the attribute to filter on</arg> <arg arg="min">start of the range to filter on</arg> <arg arg="max">end of the range to filter on</arg> <arg arg="exclude">if set, exclude the given range</arg> <return>client</return> <short>Sets the results to be filtered on the given range.</short><break/> <pre>
(set-filter-range client "filter_attr" 45 99)
(set-filter-range client "other_attr" 2 8 :exclude t) </pre><break/>
Sets the results to be filtered on a range of values for the given
@@ -67,22 +83,66 @@
will be returned.<break/>
This may be called multiple times with different attributes to
select on multiple attributes.<break/> If <code>:exclude</code> is set, excludes results that fall within the
- given range.</documentation-string></function-definition><function-definition id="cl-sphinx-search__fun__last-error" name="last-error" package="cl-sphinx-search"><lambda-list><elt>client</elt></lambda-list><documentation-string><arg arg="client">a <class id="cl-sphinx-search__class__sphinx-client">sphinx-client</class></arg> <return>a string; the last error message returned from the <code>searchd</code>.</return><break/>
- Get the last error message sent by searchd.</documentation-string></function-definition><function-definition id="cl-sphinx-search__fun__last-warning" name="last-warning" package="cl-sphinx-search"><lambda-list><elt>client</elt></lambda-list><documentation-string><arg arg="client">a <class id="cl-sphinx-search__class__sphinx-client">sphinx-client</class></arg> <return>a string; the last warning message returned from the <code>searchd</code>.</return><break/>
- Get the last warning message sent by searchd.</documentation-string></function-definition><function-definition id="cl-sphinx-search__fun__set-id-range" name="set-id-range" package="cl-sphinx-search"><lambda-list><elt>client</elt><elt>min</elt><elt>max</elt></lambda-list><documentation-string><arg arg="client">a <class id="cl-sphinx-search__class__sphinx-client">sphinx-client</class></arg> <arg arg="min">minimum id to start searching from</arg> <arg arg="max">maximum id to stop searching at</arg> <return>client</return> <short>Set the id-range to search within (inclusive).</short><break/>
- Set the range of id's within which to search. Range is inclusive, so setting
- [0, 450] both 0 and 450 id's will be found.</documentation-string></function-definition><function-definition id="cl-sphinx-search__fun__set-filter" name="set-filter" package="cl-sphinx-search"><lambda-list><elt>client</elt><elt>attribute</elt><elt>values-list</elt><elt>&amp;key</elt><elt>exclude</elt></lambda-list><documentation-string><arg arg="client">a <class id="cl-sphinx-search__class__sphinx-client">sphinx-client</class></arg> <arg arg="attribute">the attribute to filter on</arg> <arg arg="values-list">the numeric values to filter on</arg> <arg arg="exclude">if set, exclude the given values</arg> <return>client</return> <short>Sets the results to be filtered on the given attribute.</short><break/> <pre>
- (set-filter client "filter_attr" '(0 2 4 34 55 77))
- (set-filter client "other_attr" '(8 4 2 11) :exclude t) </pre><break/>
- Sets the results to be filtered on the given attribute. Only
- results which have attributes matching the given (numeric)
- values will be returned.<break/>
- This may be called multiple times with different attributes to
- select on multiple attributes.<break/> If <code>:exclude</code> is set, excludes results that match the filter.</documentation-string></function-definition></external-symbols><internal-symbols><function-definition id="cl-sphinx-search__fun___pack-filters" name="%pack-filters" package="cl-sphinx-search"><lambda-list><elt>filters</elt></lambda-list></function-definition><variable-definition id="cl-sphinx-search__variable__+sph-match-extended+" name="+sph-match-extended+" package="cl-sphinx-search"/><function-definition id="cl-sphinx-search__fun___pack-overrides" name="%pack-overrides" package="cl-sphinx-search"><lambda-list><elt>overrides</elt></lambda-list></function-definition><function-definition id="cl-sphinx-search__fun___socket" name="%socket" package="cl-sphinx-search"><lambda-list><elt>object</elt></lambda-list></function-definition><function-definition id="cl-sphinx-search__fun___port" name="%port" package="cl-sphinx-search"><lambda-list><elt>object</elt></lambda-list></function-definition><function-definition id="cl-sphinx-search__fun__sort-mode" name="sort-mode" package="cl-sphinx-search"><lambda-list><elt>object</elt></lambda-list></function-definition><variable-definition id="cl-sphinx-search__variable__+sph-sort-expr+" name="+sph-sort-expr+" package="cl-sphinx-search"/><function-definition id="cl-sphinx-search__fun___set-filter-range" name="%set-filter-range" package="cl-sphinx-search"><lambda-list><elt>client</elt><elt>type</elt><elt>attr</elt><elt>min</elt><elt>max</elt><elt>&amp;key</elt><elt>exclude</elt></lambda-list></function-definition><function-definition id="cl-sphinx-search__fun__select" name="select" package="cl-sphinx-search"><lambda-list><elt>object</elt></lambda-list></function-definition><variable-definition id="cl-sphinx-search__variable__+sph-match-any+" name="+sph-match-any+" package="cl-sphinx-search"/><function-definition id="cl-sphinx-search__fun__group-by" name="group-by" package="cl-sphinx-search"><lambda-list><elt>object</elt></lambda-list></function-definition><function-definition id="cl-sphinx-search__fun__group-function" name="group-function" package="cl-sphinx-search"><lambda-list><elt>object</elt></lambda-list></function-definition><variable-definition id="cl-sphinx-search__variable__+sph-attr-bool+" name="+sph-attr-bool+" package="cl-sphinx-search"/><variable-definition id="cl-sphinx-search__variable__+searchd-command-search+" name="+searchd-command-search+" package="cl-sphinx-search"/><function-definition id="cl-sphinx-search__fun__max-matches" name="max-matches" package="cl-sphinx-search"><lambda-list><elt>object</elt></lambda-list></function-definition><class-definition id="cl-sphinx-search__class__sphinx-client" name="sphinx-client" package="cl-sphinx-search"><cpl><superclass status="EXTERNAL" name="standard-object" package="common-lisp"/><superclass status="INTERNAL" name="slot-object" package="sb-pcl"/><superclass status="EXTERNAL" name="t" package="common-lisp"/></cpl><subclasses/><documentation-string><short>The sphinx-search class.</short><break/> <pre>
+ given range.</documentation-string></function-definition><function-definition id="cl-sphinx-search__fun__last-warning" name="last-warning" package="cl-sphinx-search"><lambda-list><elt>client</elt></lambda-list><documentation-string><arg arg="client">a <class id="cl-sphinx-search__class__sphinx-client">sphinx-client</class></arg> <return>a string; the last warning message returned from the <code>searchd</code>.</return><break/>
+ Get the last warning message sent by searchd.</documentation-string></function-definition><function-definition id="cl-sphinx-search__fun__set-group-by" name="set-group-by" package="cl-sphinx-search"><lambda-list><elt>client</elt><elt>attribute</elt><elt>function</elt><elt>&amp;optional</elt><elt>group-sort</elt></lambda-list><documentation-string><arg arg="client">a <class id="cl-sphinx-search__class__sphinx-client">sphinx-client</class></arg> <arg arg="attribute">the attribute name to group by</arg> <arg arg="function">the grouping function to use</arg> <arg arg="group-sort">the sorting clause for group-by</arg> <return>client</return> <short>Set grouping options.</short><break/> <pre>
+ (set-group-by client "whatever_attr" +sph-groupby-attr+ "group asc")
+ (set-group-by client "date_attr" +sph-groupby-day+) </pre><break/>
+ Sets attribute and function of results grouping.<break/>
+ In grouping mode, all matches are assigned to different groups based on
+ grouping function value. Each group keeps track of the total match
+ count, and the best match (in this group) according to current sorting
+ function. The final result set contains one best match per group, with
+ grouping function value and matches count attached.<break/> <code>attribute</code> is any valid attribute. Use <fun id="cl-sphinx-search__fun__reset-group-by">reset-group-by</fun>
+ to disable grouping.<break/> <code>function</code> is one of:<break/> <dl> <dt dt="+sph-groupby-day+">Group by day (assumes timestamp type attribute of form YYYYMMDD)</dt> <dt dt="+sph-groupby-week+">Group by week (assumes timestamp type attribute of form YYYYNNN)</dt> <dt dt="+sph-groupby-month+">Group by month (assumes timestamp type attribute of form YYYYMM)</dt> <dt dt="+sph-groupby-year+">Group by year (assumes timestamp type attribute of form YYYY)</dt> <dt dt="+sph-groupby-attr+">Group by attribute value</dt> <dt dt="+sph-groupby-attrpair+">Group by two attributes, being the given
+ attribute and the attribute that immediately follows it in the sequence
+ of indexed attributes. The specified attribute may therefore not be the last of the indexed attributes</dt> </dl><break/>
+ Groups in the set of results can be sorted by any SQL-like sorting clause,
+ including both document attributes and the following special internal
+ Sphinx attributes:<break/> <dl> <dt dt="id">document ID</dt> <dt dt="weight, rank, relevance">match weight</dt> <dt dt="group">group by function value</dt> <dt dt="count">number of matches in group</dt> </dl><break/>
+ The default mode is to sort by group-by value in descending order,
+ ie. by "group desc".<break/> In the results set, <code>total-found</code> contains the total amount of
+ matching groups over the whole index.<break/>
+ WARNING: grouping is done in fixed memory and thus its results
+ are only approximate; so there might be more groups reported in <code>total-found</code> than actually present. <code>count</code> might
+ also be underestimated.<break/>
+ For example, if sorting by relevance and grouping by a "published"
+ attribute with +sph-groupby-day+ function, then the result set will
+ contain only the most relevant match for each day when there were any
+ matches published, with day number and per-day match count attached,
+ and sorted by day number in descending order (ie. recent days first).</documentation-string></function-definition><function-definition id="cl-sphinx-search__fun__set-group-distinct" name="set-group-distinct" package="cl-sphinx-search"><lambda-list><elt>client</elt><elt>attribute</elt></lambda-list><documentation-string><arg arg="client">a <class id="cl-sphinx-search__class__sphinx-client">sphinx-client</class></arg> <arg arg="attribute">the attribute to use for count-distinct queries</arg> <return>client</return> <short>Set count-distinct attribute for group-by queries.</short></documentation-string></function-definition><function-definition id="cl-sphinx-search__fun__set-limits" name="set-limits" package="cl-sphinx-search"><lambda-list><elt>client</elt><elt>&amp;key</elt><elt>offset</elt><elt>limit</elt><elt>max</elt><elt>cutoff</elt></lambda-list><documentation-string><arg arg="client">a <class id="cl-sphinx-search__class__sphinx-client">sphinx-client</class></arg> <arg arg="offset">the offset to start returning matches from</arg> <arg arg="limit">how many matches to return starting from <code>offset</code></arg> <arg arg="max">maximum number of matches to return</arg> <arg arg="cutoff">the cutoff to stop searching at</arg> <return>client</return> <short>Set the offset, limit, cutoff and max matches to return.</short><break/> <pre>
+ (set-limits client :limit limit)
+ (set-limits client :offset offset :limit limit)
+ (set-limits client :offset offset :limit limit :max max-matches) </pre><break/>
+ Set limit of matches to return. Defaults to offset 0 and 1000 max matches.</documentation-string></function-definition><function-definition id="cl-sphinx-search__fun__set-select" name="set-select" package="cl-sphinx-search"><lambda-list><elt>client</elt><elt>select</elt></lambda-list><documentation-string><arg arg="client">a <class id="cl-sphinx-search__class__sphinx-client">sphinx-client</class></arg> <arg arg="select">the select string</arg> <return>client</return> <short>Set the select clause.</short><break/>
+ Sets the select clause, listing specific attributes to fetch, and
+ expressions to compute and fetch. Clause syntax mimics SQL.<break/>
+ The select clause is very similar to the part of a typical SQL query between <code>SELECT</code> and <code>FROM</code>. It lets you choose what
+ attributes (columns) to fetch, and also what expressions over the
+ columns to compute and fetch. A difference from SQL is that expressions
+ must always be aliased to a correct identifier (consisting of letters
+ and digits) using the 'AS' keyword. Sphinx enforces aliases so that the
+ computation results can be returned under a 'normal' name in the result
+ set, used in other clauses, etc.<break/>
+ Everything else is basically identical to SQL. Star ('*') is supported.
+ Functions are supported. Arbitrary amount of expressions is supported.
+ Computed expressions can be used for sorting, filtering, and grouping,
+ just as the regular attributes.<break/>
+ Aggregate functions (AVG(), MIN(), MAX(), SUM()) are supported when
+ using GROUP BY.<break/>
+ Examples:<break/> <pre>
+ (set-select sph "*, (user_karma+ln(pageviews))*0.1 AS myweight" )
+ (set-select sph "exp_years, salary_gbp*{$gbp_usd_rate} AS salary_usd, IF(age&gt;40,1,0) AS over40" )
+ (set-select sph "*, AVG(price) AS avgprice" ) </pre></documentation-string></function-definition></external-symbols><internal-symbols><variable-definition id="cl-sphinx-search__variable__+sph-match-extended+" name="+sph-match-extended+" package="cl-sphinx-search"/><function-definition id="cl-sphinx-search__fun___pack-overrides" name="%pack-overrides" package="cl-sphinx-search"><lambda-list><elt>overrides</elt></lambda-list></function-definition><function-definition id="cl-sphinx-search__fun___socket" name="%socket" package="cl-sphinx-search"><lambda-list><elt>object</elt></lambda-list></function-definition><function-definition id="cl-sphinx-search__fun___port" name="%port" package="cl-sphinx-search"><lambda-list><elt>object</elt></lambda-list></function-definition><function-definition id="cl-sphinx-search__fun__sort-mode" name="sort-mode" package="cl-sphinx-search"><lambda-list><elt>object</elt></lambda-list></function-definition><variable-definition id="cl-sphinx-search__variable__+sph-sort-expr+" name="+sph-sort-expr+" package="cl-sphinx-search"/><function-definition id="cl-sphinx-search__fun___set-filter-range" name="%set-filter-range" package="cl-sphinx-search"><lambda-list><elt>client</elt><elt>type</elt><elt>attr</elt><elt>min</elt><elt>max</elt><elt>&amp;key</elt><elt>exclude</elt></lambda-list></function-definition><function-definition id="cl-sphinx-search__fun__select" name="select" package="cl-sphinx-search"><lambda-list><elt>object</elt></lambda-list></function-definition><variable-definition id="cl-sphinx-search__variable__+sph-match-any+" name="+sph-match-any+" package="cl-sphinx-search"/><function-definition id="cl-sphinx-search__fun__group-by" name="group-by" package="cl-sphinx-search"><lambda-list><elt>object</elt></lambda-list></function-definition><variable-definition id="cl-sphinx-search__variable__+sph-attr-bool+" name="+sph-attr-bool+" package="cl-sphinx-search"/><variable-definition id="cl-sphinx-search__variable__+sph-sort-functions+" name="+sph-sort-functions+" package="cl-sphinx-search"/><variable-definition id="cl-sphinx-search__variable__+searchd-command-search+" name="+searchd-command-search+" package="cl-sphinx-search"/><function-definition id="cl-sphinx-search__fun___parse-response" name="%parse-response" package="cl-sphinx-search"><lambda-list><elt>response</elt><elt>n-requests</elt></lambda-list></function-definition><function-definition id="cl-sphinx-search__fun__max-matches" name="max-matches" package="cl-sphinx-search"><lambda-list><elt>object</elt></lambda-list></function-definition><class-definition id="cl-sphinx-search__class__sphinx-client" name="sphinx-client" package="cl-sphinx-search"><cpl><superclass status="EXTERNAL" name="standard-object" package="common-lisp"/><superclass status="INTERNAL" name="slot-object" package="sb-pcl"/><superclass status="EXTERNAL" name="t" package="common-lisp"/></cpl><subclasses/><documentation-string><short>The sphinx-search class.</short><break/> <pre>
(let ((sph (make-instance 'sphinx-client :host "localhost" :port 3315)))
(add-query sph "test")
(run-queries sph)) </pre><break/>
The interface to the search daemon goes through this class.<break/>
Set options and settings of the search to be performed on an object
of this class, and then have it perform one search by calling <fun id="cl-sphinx-search__fun__query">query</fun>, or add a number of queries using <fun id="cl-sphinx-search__fun__add-query">add-query</fun> and then calling <fun id="cl-sphinx-search__fun__run-queries">run-queries</fun>.<break/>
- Either get a result hash or a list of result hashes back, or an error that can be retrieved with the <fun id="cl-sphinx-search__fun__last-error">last-error</fun> function.<break/> <see id="cl-sphinx-search__fun__set-server">set-server</see> <see id="cl-sphinx-search__fun__set-limits">set-limits</see> <see id="cl-sphinx-search__fun__query">query</see> <see id="cl-sphinx-search__fun__add-query">add-query</see> <see id="cl-sphinx-search__fun__run-queries">run-queries</see> <see id="cl-sphinx-search__fun__last-error">last-error</see> <see id="cl-sphinx-search__fun__last-warning">last-warning</see> <see id="cl-sphinx-search__fun__set-id-range">set-id-range</see> <see id="cl-sphinx-search__fun__set-filter">set-filter</see> <see id="cl-sphinx-search__fun__set-filter-range">set-filter-range</see> <see id="cl-sphinx-search__fun__set-filter-float-range">set-filter-float-range</see> <see id="cl-sphinx-search__fun__max-query-time">max-query-time</see></documentation-string></class-definition><function-definition id="cl-sphinx-search__fun___host" name="%host" package="cl-sphinx-search"><lambda-list><elt>object</elt></lambda-list></function-definition><function-definition id="cl-sphinx-search__fun___pack-float" name="%pack-float" package="cl-sphinx-search"><lambda-list><elt>float-value</elt></lambda-list></function-definition><variable-definition id="cl-sphinx-search__variable__+searchd-command-update+" name="+searchd-command-update+" package="cl-sphinx-search"/><variable-definition id="cl-sphinx-search__variable__+searchd-command-keywords+" name="+searchd-command-keywords+" package="cl-sphinx-search"/><variable-definition id="cl-sphinx-search__variable__+sph-sort-attr-asc+" name="+sph-sort-attr-asc+" package="cl-sphinx-search"/><variable-definition id="cl-sphinx-search__variable__+sph-sort-time-segments+" name="+sph-sort-time-segments+" package="cl-sphinx-search"/><function-definition id="cl-sphinx-search__fun___encoding" name="%encoding" package="cl-sphinx-search"><lambda-list><elt>object</elt></lambda-list></function-definition><variable-definition id="cl-sphinx-search__variable__+sph-groupby-week+" name="+sph-groupby-week+" package="cl-sphinx-search"/><variable-definition id="cl-sphinx-search__variable__+sph-filter-values+" name="+sph-filter-values+" package="cl-sphinx-search"/><variable-definition id="cl-sphinx-search__variable__+sph-groupby-year+" name="+sph-groupby-year+" package="cl-sphinx-search"/><variable-definition id="cl-sphinx-search__variable__+sph-attr-float+" name="+sph-attr-float+" package="cl-sphinx-search"/><variable-definition id="cl-sphinx-search__variable__+sph-sort-attr-desc+" name="+sph-sort-attr-desc+" package="cl-sphinx-search"/><variable-definition id="cl-sphinx-search__variable__+searchd-command-excerpt+" name="+searchd-command-excerpt+" package="cl-sphinx-search"/><function-definition id="cl-sphinx-search__fun___pack-hash" name="%pack-hash" package="cl-sphinx-search"><lambda-list><elt>hash-table</elt></lambda-list></function-definition><function-definition id="cl-sphinx-search__fun__group-sort" name="group-sort" package="cl-sphinx-search"><lambda-list><elt>object</elt></lambda-list></function-definition><variable-definition id="cl-sphinx-search__variable__+sph-rank-bm25+" name="+sph-rank-bm25+" package="cl-sphinx-search"/><variable-definition id="cl-sphinx-search__variable__+sph-match-all+" name="+sph-match-all+" package="cl-sphinx-search"/><variable-definition id="cl-sphinx-search__variable__+sph-attr-bigint+" name="+sph-attr-bigint+" package="cl-sphinx-search"/><function-definition id="cl-sphinx-search__fun__anchor" name="anchor" package="cl-sphinx-search"><lambda-list><elt>object</elt></lambda-list></function-definition><variable-definition id="cl-sphinx-search__variable__+sph-rank-proximity-bm25+" name="+sph-rank-proximity-bm25+" package="cl-sphinx-search"/><variable-definition id="cl-sphinx-search__variable___response-length_" name="*response-length*" package="cl-sphinx-search"/><variable-definition id="cl-sphinx-search__variable__+sph-attr-ordinal+" name="+sph-attr-ordinal+" package="cl-sphinx-search"/><function-definition id="cl-sphinx-search__fun__retry-count" name="retry-count" package="cl-sphinx-search"><lambda-list><elt>object</elt></lambda-list></function-definition><function-definition id="cl-sphinx-search__fun__cutoff" name="cutoff" package="cl-sphinx-search"><lambda-list><elt>object</elt></lambda-list></function-definition><function-definition id="cl-sphinx-search__fun__retry-delay" name="retry-delay" package="cl-sphinx-search"><lambda-list><elt>object</elt></lambda-list></function-definition><variable-definition id="cl-sphinx-search__variable__+sph-attr-integer+" name="+sph-attr-integer+" package="cl-sphinx-search"/><function-definition id="cl-sphinx-search__fun__max-id" name="max-id" package="cl-sphinx-search"><lambda-list><elt>object</elt></lambda-list></function-definition><variable-definition id="cl-sphinx-search__variable__+searchd-ok+" name="+searchd-ok+" package="cl-sphinx-search"/><function-definition id="cl-sphinx-search__fun___send" name="%send" package="cl-sphinx-search"><lambda-list><elt>client</elt><elt>data</elt></lambda-list></function-definition><variable-definition id="cl-sphinx-search__variable__+sph-attr-types+" name="+sph-attr-types+" package="cl-sphinx-search"/><function-definition id="cl-sphinx-search__fun___get-fields" name="%get-fields" package="cl-sphinx-search"><lambda-list><elt>response</elt><elt>start</elt></lambda-list></function-definition><variable-definition id="cl-sphinx-search__variable__+searchd-retry+" name="+searchd-retry+" package="cl-sphinx-search"/><variable-definition id="cl-sphinx-search__variable__+sph-attr-none+" name="+sph-attr-none+" package="cl-sphinx-search"/><variable-definition id="cl-sphinx-search__variable__+sph-attr-timestamp+" name="+sph-attr-timestamp+" package="cl-sphinx-search"/><function-definition id="cl-sphinx-search__fun__min-id" name="min-id" package="cl-sphinx-search"><lambda-list><elt>object</elt></lambda-list></function-definition><function-definition id="cl-sphinx-search__fun___parse-response" name="%parse-response" package="cl-sphinx-search"><lambda-list><elt>response</elt><elt>n-requests</elt></lambda-list></function-definition><function-definition id="cl-sphinx-search__fun___read-from" name="%read-from" package="cl-sphinx-search"><lambda-list><elt>client</elt><elt>size</elt></lambda-list></function-definition><function-definition id="cl-sphinx-search__fun__match-mode" name="match-mode" package="cl-sphinx-search"><lambda-list><elt>object</elt></lambda-list></function-definition><variable-definition id="cl-sphinx-search__variable__+searchd-warning+" name="+searchd-warning+" package="cl-sphinx-search"/><variable-definition id="cl-sphinx-search__variable__+ver-command-excerpt+" name="+ver-command-excerpt+" package="cl-sphinx-search"/><variable-definition id="cl-sphinx-search__variable__+sph-match-boolean+" name="+sph-match-boolean+" package="cl-sphinx-search"/><function-definition id="cl-sphinx-search__fun__status" name="status" package="cl-sphinx-search"><lambda-list><elt>object</elt></lambda-list></function-definition><variable-definition id="cl-sphinx-search__variable__+sph-groupby-day+" name="+sph-groupby-day+" package="cl-sphinx-search"/><function-definition id="cl-sphinx-search__fun___path" name="%path" package="cl-sphinx-search"><lambda-list><elt>object</elt></lambda-list></function-definition><function-definition id="cl-sphinx-search__fun___pack-list-signed-quads" name="%pack-list-signed-quads" package="cl-sphinx-search"><lambda-list><elt>values-list</elt></lambda-list></function-definition><function-definition id="cl-sphinx-search__fun__field-weights" name="field-weights" package="cl-sphinx-search"><lambda-list><elt>object</elt></lambda-list></function-definition><function-definition id="cl-sphinx-search__fun__filters" name="filters" package="cl-sphinx-search"><lambda-list><elt>object</elt></lambda-list></function-definition><variable-definition id="cl-sphinx-search__variable__+ver-command-update+" name="+ver-command-update+" package="cl-sphinx-search"/><function-definition id="cl-sphinx-search__fun__group-distinct" name="group-distinct" package="cl-sphinx-search"><lambda-list><elt>object</elt></lambda-list></function-definition><function-definition id="cl-sphinx-search__fun___get-response-status" name="%get-response-status" package="cl-sphinx-search"><lambda-list><elt>response</elt><elt>start</elt></lambda-list></function-definition><variable-definition id="cl-sphinx-search__variable__+sph-rank-none+" name="+sph-rank-none+" package="cl-sphinx-search"/><function-definition id="cl-sphinx-search__fun__limit" name="limit" package="cl-sphinx-search"><lambda-list><elt>object</elt></lambda-list></function-definition><variable-definition id="cl-sphinx-search__variable__+sph-groupby-attr+" name="+sph-groupby-attr+" package="cl-sphinx-search"/><variable-definition id="cl-sphinx-search__variable__+sph-groupby-month+" name="+sph-groupby-month+" package="cl-sphinx-search"/><function-definition id="cl-sphinx-search__fun___get-matches" name="%get-matches" package="cl-sphinx-search"><lambda-list><elt>response</elt><elt>attribute-names</elt><elt>attributes</elt><elt>start</elt></lambda-list></function-definition><variable-definition id="cl-sphinx-search__variable__+ver-command-search+" name="+ver-command-search+" package="cl-sphinx-search"/><function-definition id="cl-sphinx-search__fun___get-attributes" name="%get-attributes" package="cl-sphinx-search"><lambda-list><elt>response</elt><elt>start</elt></lambda-list></function-definition><function-definition id="cl-sphinx-search__fun__offset" name="offset" package="cl-sphinx-search"><lambda-list><elt>object</elt></lambda-list></function-definition><macro-definition id="cl-sphinx-search__fun__define-constant" name="define-constant" package="cl-sphinx-search"><lambda-list><elt>name</elt><elt>value</elt><elt>&amp;optional</elt><elt>doc</elt></lambda-list></macro-definition><function-definition id="cl-sphinx-search__fun__overrides" name="overrides" package="cl-sphinx-search"><lambda-list><elt>object</elt></lambda-list></function-definition><function-definition id="cl-sphinx-search__fun___get-response" name="%get-response" package="cl-sphinx-search"><lambda-list><elt>client</elt><elt>&amp;key</elt><elt>client-version</elt></lambda-list></function-definition><variable-definition id="cl-sphinx-search__variable__+ver-command-keywords+" name="+ver-command-keywords+" package="cl-sphinx-search"/><variable-definition id="cl-sphinx-search__variable__+sph-match-extended2+" name="+sph-match-extended2+" package="cl-sphinx-search"/><function-definition id="cl-sphinx-search__fun__sort-by" name="sort-by" package="cl-sphinx-search"><lambda-list><elt>object</elt></lambda-list></function-definition><variable-definition id="cl-sphinx-search__variable__+sph-filter-floatrange+" name="+sph-filter-floatrange+" package="cl-sphinx-search"/><function-definition id="cl-sphinx-search__fun___connect" name="%connect" package="cl-sphinx-search"><lambda-list><elt>client</elt></lambda-list></function-definition><variable-definition id="cl-sphinx-search__variable__+sph-rank-wordcount+" name="+sph-rank-wordcount+" package="cl-sphinx-search"/><variable-definition id="cl-sphinx-search__variable__+sph-groupby-attrpair+" name="+sph-groupby-attrpair+" package="cl-sphinx-search"/><function-definition id="cl-sphinx-search__fun__reqs" name="reqs" package="cl-sphinx-search"><lambda-list><elt>object</elt></lambda-list></function-definition><function-definition id="cl-sphinx-search__fun__weights" name="weights" package="cl-sphinx-search"><lambda-list><elt>object</elt></lambda-list></function-definition><macro-definition id="cl-sphinx-search__fun__adv-p" name="adv-p" package="cl-sphinx-search"><lambda-list><elt>n</elt></lambda-list></macro-definition><variable-definition id="cl-sphinx-search__variable__+sph-attr-multi+" name="+sph-attr-multi+" package="cl-sphinx-search"/><variable-definition id="cl-sphinx-search__variable__+searchd-command-persist+" name="+searchd-command-persist+" package="cl-sphinx-search"/><function-definition id="cl-sphinx-search__fun__rank-mode" name="rank-mode" package="cl-sphinx-search"><lambda-list><elt>object</elt></lambda-list></function-definition><variable-definition id="cl-sphinx-search__variable__+sph-match-fullscan+" name="+sph-match-fullscan+" package="cl-sphinx-search"/><variable-definition id="cl-sphinx-search__variable__+sph-sort-extended+" name="+sph-sort-extended+" package="cl-sphinx-search"/><variable-definition id="cl-sphinx-search__variable__+sph-match-phrase+" name="+sph-match-phrase+" package="cl-sphinx-search"/><variable-definition id="cl-sphinx-search__variable__+sph-filter-range+" name="+sph-filter-range+" package="cl-sphinx-search"/><variable-definition id="cl-sphinx-search__variable__+searchd-error+" name="+searchd-error+" package="cl-sphinx-search"/><variable-definition id="cl-sphinx-search__variable__+sph-sort-relevance+" name="+sph-sort-relevance+" package="cl-sphinx-search"/><function-definition id="cl-sphinx-search__fun__index-weights" name="index-weights" package="cl-sphinx-search"><lambda-list><elt>object</elt></lambda-list></function-definition></internal-symbols></package></documentation>
+ Either get a result hash or a list of result hashes back, or an error that can be retrieved with the <fun id="cl-sphinx-search__fun__last-error">last-error</fun> function.<break/> <see id="cl-sphinx-search__fun__set-server">set-server</see> <see id="cl-sphinx-search__fun__set-limits">set-limits</see> <see id="cl-sphinx-search__fun__query">query</see> <see id="cl-sphinx-search__fun__add-query">add-query</see> <see id="cl-sphinx-search__fun__run-queries">run-queries</see> <see id="cl-sphinx-search__fun__last-error">last-error</see> <see id="cl-sphinx-search__fun__last-warning">last-warning</see> <see id="cl-sphinx-search__fun__set-id-range">set-id-range</see> <see id="cl-sphinx-search__fun__set-filter">set-filter</see> <see id="cl-sphinx-search__fun__set-filter-range">set-filter-range</see> <see id="cl-sphinx-search__fun__set-filter-float-range">set-filter-float-range</see> <see id="cl-sphinx-search__fun__max-query-time">max-query-time</see></documentation-string></class-definition><function-definition id="cl-sphinx-search__fun___host" name="%host" package="cl-sphinx-search"><lambda-list><elt>object</elt></lambda-list></function-definition><variable-definition id="cl-sphinx-search__variable__+sph-sort-attr-desc+" name="+sph-sort-attr-desc+" package="cl-sphinx-search"/><function-definition id="cl-sphinx-search__fun___pack-float" name="%pack-float" package="cl-sphinx-search"><lambda-list><elt>float-value</elt></lambda-list></function-definition><variable-definition id="cl-sphinx-search__variable__+searchd-command-update+" name="+searchd-command-update+" package="cl-sphinx-search"/><variable-definition id="cl-sphinx-search__variable__+searchd-command-keywords+" name="+searchd-command-keywords+" package="cl-sphinx-search"/><variable-definition id="cl-sphinx-search__variable__+sph-sort-attr-asc+" name="+sph-sort-attr-asc+" package="cl-sphinx-search"/><variable-definition id="cl-sphinx-search__variable__+sph-sort-time-segments+" name="+sph-sort-time-segments+" package="cl-sphinx-search"/><function-definition id="cl-sphinx-search__fun___encoding" name="%encoding" package="cl-sphinx-search"><lambda-list><elt>object</elt></lambda-list></function-definition><variable-definition id="cl-sphinx-search__variable__+sph-groupby-week+" name="+sph-groupby-week+" package="cl-sphinx-search"/><variable-definition id="cl-sphinx-search__variable__+sph-filter-values+" name="+sph-filter-values+" package="cl-sphinx-search"/><variable-definition id="cl-sphinx-search__variable__+sph-groupby-year+" name="+sph-groupby-year+" package="cl-sphinx-search"/><variable-definition id="cl-sphinx-search__variable__+sph-attr-float+" name="+sph-attr-float+" package="cl-sphinx-search"/><function-definition id="cl-sphinx-search__fun__geo-anchor" name="geo-anchor" package="cl-sphinx-search"><lambda-list><elt>object</elt></lambda-list></function-definition><variable-definition id="cl-sphinx-search__variable__+searchd-command-excerpt+" name="+searchd-command-excerpt+" package="cl-sphinx-search"/><variable-definition id="cl-sphinx-search__variable__+sph-attr-multi+" name="+sph-attr-multi+" package="cl-sphinx-search"/><function-definition id="cl-sphinx-search__fun___pack-hash" name="%pack-hash" package="cl-sphinx-search"><lambda-list><elt>hash-table</elt></lambda-list></function-definition><function-definition id="cl-sphinx-search__fun__group-sort" name="group-sort" package="cl-sphinx-search"><lambda-list><elt>object</elt></lambda-list></function-definition><variable-definition id="cl-sphinx-search__variable__+sph-rank-bm25+" name="+sph-rank-bm25+" package="cl-sphinx-search"/><variable-definition id="cl-sphinx-search__variable__+sph-match-all+" name="+sph-match-all+" package="cl-sphinx-search"/><variable-definition id="cl-sphinx-search__variable__+sph-attr-bigint+" name="+sph-attr-bigint+" package="cl-sphinx-search"/><variable-definition id="cl-sphinx-search__variable__+sph-rank-proximity-bm25+" name="+sph-rank-proximity-bm25+" package="cl-sphinx-search"/><variable-definition id="cl-sphinx-search__variable___response-length_" name="*response-length*" package="cl-sphinx-search"/><variable-definition id="cl-sphinx-search__variable__+sph-attr-ordinal+" name="+sph-attr-ordinal+" package="cl-sphinx-search"/><function-definition id="cl-sphinx-search__fun__retry-count" name="retry-count" package="cl-sphinx-search"><lambda-list><elt>object</elt></lambda-list></function-definition><function-definition id="cl-sphinx-search__fun__limit" name="limit" package="cl-sphinx-search"><lambda-list><elt>object</elt></lambda-list></function-definition><function-definition id="cl-sphinx-search__fun__cutoff" name="cutoff" package="cl-sphinx-search"><lambda-list><elt>object</elt></lambda-list></function-definition><function-definition id="cl-sphinx-search__fun__retry-delay" name="retry-delay" package="cl-sphinx-search"><lambda-list><elt>object</elt></lambda-list></function-definition><variable-definition id="cl-sphinx-search__variable__+sph-attr-integer+" name="+sph-attr-integer+" package="cl-sphinx-search"/><function-definition id="cl-sphinx-search__fun__max-id" name="max-id" package="cl-sphinx-search"><lambda-list><elt>object</elt></lambda-list></function-definition><variable-definition id="cl-sphinx-search__variable__+searchd-ok+" name="+searchd-ok+" package="cl-sphinx-search"/><function-definition id="cl-sphinx-search__fun___send" name="%send" package="cl-sphinx-search"><lambda-list><elt>client</elt><elt>data</elt></lambda-list></function-definition><variable-definition id="cl-sphinx-search__variable__+sph-attr-types+" name="+sph-attr-types+" package="cl-sphinx-search"/><function-definition id="cl-sphinx-search__fun___get-fields" name="%get-fields" package="cl-sphinx-search"><lambda-list><elt>response</elt><elt>start</elt></lambda-list></function-definition><variable-definition id="cl-sphinx-search__variable__+searchd-retry+" name="+searchd-retry+" package="cl-sphinx-search"/><variable-definition id="cl-sphinx-search__variable__+sph-attr-none+" name="+sph-attr-none+" package="cl-sphinx-search"/><variable-definition id="cl-sphinx-search__variable__+sph-attr-timestamp+" name="+sph-attr-timestamp+" package="cl-sphinx-search"/><function-definition id="cl-sphinx-search__fun__min-id" name="min-id" package="cl-sphinx-search"><lambda-list><elt>object</elt></lambda-list></function-definition><function-definition id="cl-sphinx-search__fun__group-function" name="group-function" package="cl-sphinx-search"><lambda-list><elt>object</elt></lambda-list></function-definition><function-definition id="cl-sphinx-search__fun___read-from" name="%read-from" package="cl-sphinx-search"><lambda-list><elt>client</elt><elt>size</elt></lambda-list></function-definition><function-definition id="cl-sphinx-search__fun__match-mode" name="match-mode" package="cl-sphinx-search"><lambda-list><elt>object</elt></lambda-list></function-definition><variable-definition id="cl-sphinx-search__variable__+searchd-warning+" name="+searchd-warning+" package="cl-sphinx-search"/><variable-definition id="cl-sphinx-search__variable__+ver-command-excerpt+" name="+ver-command-excerpt+" package="cl-sphinx-search"/><variable-definition id="cl-sphinx-search__variable__+sph-match-boolean+" name="+sph-match-boolean+" package="cl-sphinx-search"/><function-definition id="cl-sphinx-search__fun__status" name="status" package="cl-sphinx-search"><lambda-list><elt>object</elt></lambda-list></function-definition><variable-definition id="cl-sphinx-search__variable__+sph-groupby-day+" name="+sph-groupby-day+" package="cl-sphinx-search"/><function-definition id="cl-sphinx-search__fun___path" name="%path" package="cl-sphinx-search"><lambda-list><elt>object</elt></lambda-list></function-definition><function-definition id="cl-sphinx-search__fun___pack-list-signed-quads" name="%pack-list-signed-quads" package="cl-sphinx-search"><lambda-list><elt>values-list</elt></lambda-list></function-definition><function-definition id="cl-sphinx-search__fun__field-weights" name="field-weights" package="cl-sphinx-search"><lambda-list><elt>object</elt></lambda-list></function-definition><function-definition id="cl-sphinx-search__fun__filters" name="filters" package="cl-sphinx-search"><lambda-list><elt>object</elt></lambda-list></function-definition><variable-definition id="cl-sphinx-search__variable__+ver-command-update+" name="+ver-command-update+" package="cl-sphinx-search"/><function-definition id="cl-sphinx-search__fun__group-distinct" name="group-distinct" package="cl-sphinx-search"><lambda-list><elt>object</elt></lambda-list></function-definition><function-definition id="cl-sphinx-search__fun___get-response-status" name="%get-response-status" package="cl-sphinx-search"><lambda-list><elt>response</elt><elt>start</elt></lambda-list></function-definition><variable-definition id="cl-sphinx-search__variable__+sph-rank-none+" name="+sph-rank-none+" package="cl-sphinx-search"/><variable-definition id="cl-sphinx-search__variable__+sph-groupby-attr+" name="+sph-groupby-attr+" package="cl-sphinx-search"/><variable-definition id="cl-sphinx-search__variable__+sph-groupby-month+" name="+sph-groupby-month+" package="cl-sphinx-search"/><function-definition id="cl-sphinx-search__fun___get-matches" name="%get-matches" package="cl-sphinx-search"><lambda-list><elt>response</elt><elt>attribute-names</elt><elt>attributes</elt><elt>start</elt></lambda-list></function-definition><variable-definition id="cl-sphinx-search__variable__+ver-command-search+" name="+ver-command-search+" package="cl-sphinx-search"/><function-definition id="cl-sphinx-search__fun___pack-filters" name="%pack-filters" package="cl-sphinx-search"><lambda-list><elt>filters</elt></lambda-list></function-definition><function-definition id="cl-sphinx-search__fun__offset" name="offset" package="cl-sphinx-search"><lambda-list><elt>object</elt></lambda-list></function-definition><macro-definition id="cl-sphinx-search__fun__define-constant" name="define-constant" package="cl-sphinx-search"><lambda-list><elt>name</elt><elt>value</elt><elt>&amp;optional</elt><elt>doc</elt></lambda-list></macro-definition><function-definition id="cl-sphinx-search__fun__overrides" name="overrides" package="cl-sphinx-search"><lambda-list><elt>object</elt></lambda-list></function-definition><function-definition id="cl-sphinx-search__fun___get-response" name="%get-response" package="cl-sphinx-search"><lambda-list><elt>client</elt><elt>&amp;key</elt><elt>client-version</elt></lambda-list></function-definition><variable-definition id="cl-sphinx-search__variable__+ver-command-keywords+" name="+ver-command-keywords+" package="cl-sphinx-search"/><variable-definition id="cl-sphinx-search__variable__+sph-match-extended2+" name="+sph-match-extended2+" package="cl-sphinx-search"/><function-definition id="cl-sphinx-search__fun__sort-by" name="sort-by" package="cl-sphinx-search"><lambda-list><elt>object</elt></lambda-list></function-definition><variable-definition id="cl-sphinx-search__variable__+sph-filter-floatrange+" name="+sph-filter-floatrange+" package="cl-sphinx-search"/><function-definition id="cl-sphinx-search__fun___connect" name="%connect" package="cl-sphinx-search"><lambda-list><elt>client</elt></lambda-list></function-definition><variable-definition id="cl-sphinx-search__variable__+sph-rank-wordcount+" name="+sph-rank-wordcount+" package="cl-sphinx-search"/><variable-definition id="cl-sphinx-search__variable__+sph-groupby-attrpair+" name="+sph-groupby-attrpair+" package="cl-sphinx-search"/><function-definition id="cl-sphinx-search__fun__reqs" name="reqs" package="cl-sphinx-search"><lambda-list><elt>object</elt></lambda-list></function-definition><function-definition id="cl-sphinx-search__fun__weights" name="weights" package="cl-sphinx-search"><lambda-list><elt>object</elt></lambda-list></function-definition><macro-definition id="cl-sphinx-search__fun__adv-p" name="adv-p" package="cl-sphinx-search"><lambda-list><elt>n</elt></lambda-list></macro-definition><variable-definition id="cl-sphinx-search__variable__+searchd-command-persist+" name="+searchd-command-persist+" package="cl-sphinx-search"/><function-definition id="cl-sphinx-search__fun__rank-mode" name="rank-mode" package="cl-sphinx-search"><lambda-list><elt>object</elt></lambda-list></function-definition><variable-definition id="cl-sphinx-search__variable__+sph-match-fullscan+" name="+sph-match-fullscan+" package="cl-sphinx-search"/><function-definition id="cl-sphinx-search__fun___get-attributes" name="%get-attributes" package="cl-sphinx-search"><lambda-list><elt>response</elt><elt>start</elt></lambda-list></function-definition><variable-definition id="cl-sphinx-search__variable__+sph-sort-extended+" name="+sph-sort-extended+" package="cl-sphinx-search"/><variable-definition id="cl-sphinx-search__variable__+sph-match-phrase+" name="+sph-match-phrase+" package="cl-sphinx-search"/><variable-definition id="cl-sphinx-search__variable__+sph-filter-range+" name="+sph-filter-range+" package="cl-sphinx-search"/><variable-definition id="cl-sphinx-search__variable__+searchd-error+" name="+searchd-error+" package="cl-sphinx-search"/><function-definition id="cl-sphinx-search__fun__set-override" name="set-override" package="cl-sphinx-search"><lambda-list><elt>client</elt><elt>attribute</elt><elt>type</elt><elt>values</elt></lambda-list><documentation-string><arg arg="client">a <class id="cl-sphinx-search__class__sphinx-client">sphinx-client</class></arg> <arg arg="attribute">the attribute to override</arg> <arg arg="type">the attribute type as defined in Sphinx config</arg> <arg arg="values">an alist mapping document IDs to attribute values</arg> <return>client</return> <short>Set attribute values overrides.</short><break/>
+ There can be only one override per attribute.<break/> <code>values</code> must be an alist that maps document IDs to attribute
+ values.<break/> <pre>
+ (set-override client "test_attr" +sph-attr-integer+ '((4314 . 3) (2443 . 2))) </pre><break/>
+ In the example above, for the document with ID 4314, Sphinx will see an attribute value for the <code>attribute</code> called 'test_attr' of 3. And
+ for the document with ID 2443 it will see 2, while the rest will be what
+ it was when the indexer was last run.</documentation-string></function-definition><variable-definition id="cl-sphinx-search__variable__+sph-sort-relevance+" name="+sph-sort-relevance+" package="cl-sphinx-search"/><function-definition id="cl-sphinx-search__fun__index-weights" name="index-weights" package="cl-sphinx-search"><lambda-list><elt>object</elt></lambda-list></function-definition></internal-symbols></package></documentation>
View
2  doc/index.html
@@ -5,4 +5,4 @@
Index of packages:
</div><table cellspacing="0" cellpadding="0"><tr><td valign="top" width="60%"><div class="padded"><h2 class="page-title"><a href="pages/cl-sphinx-search.html">
Package
- cl-sphinx-search</a></h2><div style="left: 100px"><div class="indent">This package provides an interface to the search daemon (<i>searchd</i>) for <a href="http://www.sphinxsearch.com/">Sphinx</a>.<br><br> <br><br> <br><br> <br><br> <br><br> <br><br></div><div class="indent"><p><i>About this package:</i></p><ul><li><a href="pages/cl-sphinx-search.html#d0d0e0e0e0e0">About Sphinx</a></li><li><a href="pages/cl-sphinx-search.html#d0d0e0e0e0e1">Synopsis</a></li><li><a href="pages/cl-sphinx-search.html#d0d0e0e0e0e2">One class</a></li><li><a href="pages/cl-sphinx-search.html#d0d0e0e0e0e3">Methods</a></li><li><a href="pages/cl-sphinx-search.html#d0d0e0e0e0e4">Acknowledgements</a></li></ul></div></div></div></td><td valign="top"><h3><a name="index"></a>Exported Symbol Index</h3><table cellspacing="0" cellpadding="0"><tr><td valign="top" align="right" nowrap><span class="nonlink"><tt><span style="color: #777777">cl-sphinx-search:</span></tt></span></td><td valign="top"><a href="pages/cl-sphinx-search__fun__add-query.html"><tt>add-query</tt></a>, function</td></tr><tr><td valign="top" align="right" nowrap><span class="nonlink"><tt><span style="color: #777777">cl-sphinx-search:</span></tt></span></td><td valign="top"><a href="pages/cl-sphinx-search__fun__last-error.html"><tt>last-error</tt></a>, function</td></tr><tr><td valign="top" align="right" nowrap><span class="nonlink"><tt><span style="color: #777777">cl-sphinx-search:</span></tt></span></td><td valign="top"><a href="pages/cl-sphinx-search__fun__last-warning.html"><tt>last-warning</tt></a>, function</td></tr><tr><td valign="top" align="right" nowrap><span class="nonlink"><tt><span style="color: #777777">cl-sphinx-search:</span></tt></span></td><td valign="top"><a href="pages/cl-sphinx-search__fun__max-query-time.html"><tt>max-query-time</tt></a>, function</td></tr><tr><td valign="top" align="right" nowrap><span class="nonlink"><tt><span style="color: #777777">cl-sphinx-search:</span></tt></span></td><td valign="top"><a href="pages/cl-sphinx-search__fun__query.html"><tt>query</tt></a>, function</td></tr><tr><td valign="top" align="right" nowrap><span class="nonlink"><tt><span style="color: #777777">cl-sphinx-search:</span></tt></span></td><td valign="top"><a href="pages/cl-sphinx-search__fun__run-queries.html"><tt>run-queries</tt></a>, function</td></tr><tr><td valign="top" align="right" nowrap><span class="nonlink"><tt><span style="color: #777777">cl-sphinx-search:</span></tt></span></td><td valign="top"><a href="pages/cl-sphinx-search__fun__set-filter.html"><tt>set-filter</tt></a>, function</td></tr><tr><td valign="top" align="right" nowrap><span class="nonlink"><tt><span style="color: #777777">cl-sphinx-search:</span></tt></span></td><td valign="top"><a href="pages/cl-sphinx-search__fun__set-filter-float-range.html"><tt>set-filter-float-range</tt></a>, function</td></tr><tr><td valign="top" align="right" nowrap><span class="nonlink"><tt><span style="color: #777777">cl-sphinx-search:</span></tt></span></td><td valign="top"><a href="pages/cl-sphinx-search__fun__set-filter-range.html"><tt>set-filter-range</tt></a>, function</td></tr><tr><td valign="top" align="right" nowrap><span class="nonlink"><tt><span style="color: #777777">cl-sphinx-search:</span></tt></span></td><td valign="top"><a href="pages/cl-sphinx-search__fun__set-id-range.html"><tt>set-id-range</tt></a>, function</td></tr><tr><td valign="top" align="right" nowrap><span class="nonlink"><tt><span style="color: #777777">cl-sphinx-search:</span></tt></span></td><td valign="top"><a href="pages/cl-sphinx-search__fun__set-limits.html"><tt>set-limits</tt></a>, function</td></tr><tr><td valign="top" align="right" nowrap><span class="nonlink"><tt><span style="color: #777777">cl-sphinx-search:</span></tt></span></td><td valign="top"><a href="pages/cl-sphinx-search__fun__set-server.html"><tt>set-server</tt></a>, function</td></tr></table></td></tr></table></div></body></html>
+ cl-sphinx-search</a></h2><div style="left: 100px"><div class="indent">This package provides an interface to the search daemon (<i>searchd</i>) for <a href="http://www.sphinxsearch.com/">Sphinx</a>.<br><br> <br><br> <br><br> <br><br> <br><br> </div><div class="indent"><p><i>About this package:</i></p><ul><li><a href="pages/cl-sphinx-search.html#d0d0e0e0e0e0">About Sphinx</a></li><li><a href="pages/cl-sphinx-search.html#d0d0e0e0e0e1">Synopsis</a></li><li><a href="pages/cl-sphinx-search.html#d0d0e0e0e0e2">One class</a></li><li><a href="pages/cl-sphinx-search.html#d0d0e0e0e0e3">Methods</a></li><li><a href="pages/cl-sphinx-search.html#d0d0e0e0e0e4">Acknowledgements</a></li></ul></div></div></div></td><td valign="top"><h3><a name="index"></a>Exported Symbol Index</h3><table cellspacing="0" cellpadding="0"><tr><td valign="top" align="right" nowrap><span class="nonlink"><tt><span style="color: #777777">cl-sphinx-search:</span></tt></span></td><td valign="top"><a href="pages/cl-sphinx-search__fun__add-query.html"><tt>add-query</tt></a>, function</td></tr><tr><td valign="top" align="right" nowrap><span class="nonlink"><tt><span style="color: #777777">cl-sphinx-search:</span></tt></span></td><td valign="top"><a href="pages/cl-sphinx-search__fun__last-error.html"><tt>last-error</tt></a>, function</td></tr><tr><td valign="top" align="right" nowrap><span class="nonlink"><tt><span style="color: #777777">cl-sphinx-search:</span></tt></span></td><td valign="top"><a href="pages/cl-sphinx-search__fun__last-warning.html"><tt>last-warning</tt></a>, function</td></tr><tr><td valign="top" align="right" nowrap><span class="nonlink"><tt><span style="color: #777777">cl-sphinx-search:</span></tt></span></td><td valign="top"><a href="pages/cl-sphinx-search__fun__max-query-time.html"><tt>max-query-time</tt></a>, function</td></tr><tr><td valign="top" align="right" nowrap><span class="nonlink"><tt><span style="color: #777777">cl-sphinx-search:</span></tt></span></td><td valign="top"><a href="pages/cl-sphinx-search__fun__query.html"><tt>query</tt></a>, function</td></tr><tr><td valign="top" align="right" nowrap><span class="nonlink"><tt><span style="color: #777777">cl-sphinx-search:</span></tt></span></td><td valign="top"><a href="pages/cl-sphinx-search__fun__reset-filters.html"><tt>reset-filters</tt></a>, function</td></tr><tr><td valign="top" align="right" nowrap><span class="nonlink"><tt><span style="color: #777777">cl-sphinx-search:</span></tt></span></td><td valign="top"><a href="pages/cl-sphinx-search__fun__reset-group-by.html"><tt>reset-group-by</tt></a>, function</td></tr><tr><td valign="top" align="right" nowrap><span class="nonlink"><tt><span style="color: #777777">cl-sphinx-search:</span></tt></span></td><td valign="top"><a href="pages/cl-sphinx-search__fun__reset-overrides.html"><tt>reset-overrides</tt></a>, function</td></tr><tr><td valign="top" align="right" nowrap><span class="nonlink"><tt><span style="color: #777777">cl-sphinx-search:</span></tt></span></td><td valign="top"><a href="pages/cl-sphinx-search__fun__run-queries.html"><tt>run-queries</tt></a>, function</td></tr><tr><td valign="top" align="right" nowrap><span class="nonlink"><tt><span style="color: #777777">cl-sphinx-search:</span></tt></span></td><td valign="top"><a href="pages/cl-sphinx-search__fun__set-filter.html"><tt>set-filter</tt></a>, function</td></tr><tr><td valign="top" align="right" nowrap><span class="nonlink"><tt><span style="color: #777777">cl-sphinx-search:</span></tt></span></td><td valign="top"><a href="pages/cl-sphinx-search__fun__set-filter-float-range.html"><tt>set-filter-float-range</tt></a>, function</td></tr><tr><td valign="top" align="right" nowrap><span class="nonlink"><tt><span style="color: #777777">cl-sphinx-search:</span></tt></span></td><td valign="top"><a href="pages/cl-sphinx-search__fun__set-filter-range.html"><tt>set-filter-range</tt></a>, function</td></tr><tr><td valign="top" align="right" nowrap><span class="nonlink"><tt><span style="color: #777777">cl-sphinx-search:</span></tt></span></td><td valign="top"><a href="pages/cl-sphinx-search__fun__set-geo-anchor.html"><tt>set-geo-anchor</tt></a>, function</td></tr><tr><td valign="top" align="right" nowrap><span class="nonlink"><tt><span style="color: #777777">cl-sphinx-search:</span></tt></span></td><td valign="top"><a href="pages/cl-sphinx-search__fun__set-group-by.html"><tt>set-group-by</tt></a>, function</td></tr><tr><td valign="top" align="right" nowrap><span class="nonlink"><tt><span style="color: #777777">cl-sphinx-search:</span></tt></span></td><td valign="top"><a href="pages/cl-sphinx-search__fun__set-group-distinct.html"><tt>set-group-distinct</tt></a>, function</td></tr><tr><td valign="top" align="right" nowrap><span class="nonlink"><tt><span style="color: #777777">cl-sphinx-search:</span></tt></span></td><td valign="top"><a href="pages/cl-sphinx-search__fun__set-id-range.html"><tt>set-id-range</tt></a>, function</td></tr><tr><td valign="top" align="right" nowrap><span class="nonlink"><tt><span style="color: #777777">cl-sphinx-search:</span></tt></span></td><td valign="top"><a href="pages/cl-sphinx-search__fun__set-limits.html"><tt>set-limits</tt></a>, function</td></tr><tr><td valign="top" align="right" nowrap><span class="nonlink"><tt><span style="color: #777777">cl-sphinx-search:</span></tt></span></td><td valign="top"><a href="pages/cl-sphinx-search__fun__set-select.html"><tt>set-select</tt></a>, function</td></tr><tr><td valign="top" align="right" nowrap><span class="nonlink"><tt><span style="color: #777777">cl-sphinx-search:</span></tt></span></td><td valign="top"><a href="pages/cl-sphinx-search__fun__set-server.html"><tt>set-server</tt></a>, function</td></tr></table></td></tr></table></div></body></html>
View
4 doc/pages/cl-sphinx-search.html
@@ -3,7 +3,7 @@
  
<b> Common Lisp Sphinx Search API</b></td><td valign="center" align="right"><b>API documentation</b></td></tr></table></div><div class="main"><div class="padded"><h1>
Package
- cl-sphinx-search</h1><div class="indent">This package provides an interface to the search daemon (<i>searchd</i>) for <a href="http://www.sphinxsearch.com/">Sphinx</a>.<br><br> <br><br> <br><br> <br><br> <br><br> <br><br></div></div><table cellspacing="0" cellpadding="0"><tr><td valign="top" width="60%"><div class="padded"><div style="margin-left: -30px"><h3>About This Package</h3></div><a href="#d0d0e0e0e0e0" style="font-weight: bold">About Sphinx</a><br><a href="#d0d0e0e0e0e1" style="font-weight: bold">Synopsis</a><br><a href="#d0d0e0e0e0e2" style="font-weight: bold">One class</a><br><a href="#d0d0e0e0e0e3" style="font-weight: bold">Methods</a><br><a href="#d0d0e0e0e0e4" style="font-weight: bold">Acknowledgements</a><br><br><h2><a name="d0d0e0e0e0e0"></a>About Sphinx</h2><br><br>
+ cl-sphinx-search</h1><div class="indent">This package provides an interface to the search daemon (<i>searchd</i>) for <a href="http://www.sphinxsearch.com/">Sphinx</a>.<br><br> <br><br> <br><br> <br><br> <br><br> </div></div><table cellspacing="0" cellpadding="0"><tr><td valign="top" width="60%"><div class="padded"><div style="margin-left: -30px"><h3>About This Package</h3></div><a href="#d0d0e0e0e0e0" style="font-weight: bold">About Sphinx</a><br><a href="#d0d0e0e0e0e1" style="font-weight: bold">Synopsis</a><br><a href="#d0d0e0e0e0e2" style="font-weight: bold">One class</a><br><a href="#d0d0e0e0e0e3" style="font-weight: bold">Methods</a><br><a href="#d0d0e0e0e0e4" style="font-weight: bold">Acknowledgements</a><br><br><h2><a name="d0d0e0e0e0e0"></a>About Sphinx</h2><br><br>
From the site:<br><br> <pre>
Sphinx is a full-text search engine, distributed under GPL version 2.
Commercial license is also available for embedded use.<br><br>
@@ -30,4 +30,4 @@
Sphinx version 0.9.7-rc1, by Len Kranendonk, which was in turn
based on the Sphinx PHP API. </pre><br><br>
Also used was the api for python which was supplied with the source code download for Sphinx Search v0.9.9-rc2, in the <tt>api/</tt> directory.<br><br> <b>Documentation</b><br><br> This documentation was generated by <a href="http://www.lichteblau.com/atdoc/doc/">atdoc</a>,
- the documentation generation system written by David Lichteblau.<br><br> </div></td><td valign="top"><h3><a name="index"></a>Exported Symbol Index</h3><table cellspacing="0" cellpadding="0"><tr><td valign="top"><a href="cl-sphinx-search__fun__add-query.html"><tt>add-query</tt></a>, function</td></tr><tr><td valign="top"><a href="cl-sphinx-search__fun__last-error.html"><tt>last-error</tt></a>, function</td></tr><tr><td valign="top"><a href="cl-sphinx-search__fun__last-warning.html"><tt>last-warning</tt></a>, function</td></tr><tr><td valign="top"><a href="cl-sphinx-search__fun__max-query-time.html"><tt>max-query-time</tt></a>, function</td></tr><tr><td valign="top"><a href="cl-sphinx-search__fun__query.html"><tt>query</tt></a>, function</td></tr><tr><td valign="top"><a href="cl-sphinx-search__fun__run-queries.html"><tt>run-queries</tt></a>, function</td></tr><tr><td valign="top"><a href="cl-sphinx-search__fun__set-filter.html"><tt>set-filter</tt></a>, function</td></tr><tr><td valign="top"><a href="cl-sphinx-search__fun__set-filter-float-range.html"><tt>set-filter-float-range</tt></a>, function</td></tr><tr><td valign="top"><a href="cl-sphinx-search__fun__set-filter-range.html"><tt>set-filter-range</tt></a>, function</td></tr><tr><td valign="top"><a href="cl-sphinx-search__fun__set-id-range.html"><tt>set-id-range</tt></a>, function</td></tr><tr><td valign="top"><a href="cl-sphinx-search__fun__set-limits.html"><tt>set-limits</tt></a>, function</td></tr><tr><td valign="top"><a href="cl-sphinx-search__fun__set-server.html"><tt>set-server</tt></a>, function</td></tr></table></td></tr></table></div></body></html>
+ the documentation generation system written by David Lichteblau.<br><br> </div></td><td valign="top"><h3><a name="index"></a>Exported Symbol Index</h3><table cellspacing="0" cellpadding="0"><tr><td valign="top"><a href="cl-sphinx-search__fun__add-query.html"><tt>add-query</tt></a>, function</td></tr><tr><td valign="top"><a href="cl-sphinx-search__fun__last-error.html"><tt>last-error</tt></a>, function</td></tr><tr><td valign="top"><a href="cl-sphinx-search__fun__last-warning.html"><tt>last-warning</tt></a>, function</td></tr><tr><td valign="top"><a href="cl-sphinx-search__fun__max-query-time.html"><tt>max-query-time</tt></a>, function</td></tr><tr><td valign="top"><a href="cl-sphinx-search__fun__query.html"><tt>query</tt></a>, function</td></tr><tr><td valign="top"><a href="cl-sphinx-search__fun__reset-filters.html"><tt>reset-filters</tt></a>, function</td></tr><tr><td valign="top"><a href="cl-sphinx-search__fun__reset-group-by.html"><tt>reset-group-by</tt></a>, function</td></tr><tr><td valign="top"><a href="cl-sphinx-search__fun__reset-overrides.html"><tt>reset-overrides</tt></a>, function</td></tr><tr><td valign="top"><a href="cl-sphinx-search__fun__run-queries.html"><tt>run-queries</tt></a>, function</td></tr><tr><td valign="top"><a href="cl-sphinx-search__fun__set-filter.html"><tt>set-filter</tt></a>, function</td></tr><tr><td valign="top"><a href="cl-sphinx-search__fun__set-filter-float-range.html"><tt>set-filter-float-range</tt></a>, function</td></tr><tr><td valign="top"><a href="cl-sphinx-search__fun__set-filter-range.html"><tt>set-filter-range</tt></a>, function</td></tr><tr><td valign="top"><a href="cl-sphinx-search__fun__set-geo-anchor.html"><tt>set-geo-anchor</tt></a>, function</td></tr><tr><td valign="top"><a href="cl-sphinx-search__fun__set-group-by.html"><tt>set-group-by</tt></a>, function</td></tr><tr><td valign="top"><a href="cl-sphinx-search__fun__set-group-distinct.html"><tt>set-group-distinct</tt></a>, function</td></tr><tr><td valign="top"><a href="cl-sphinx-search__fun__set-id-range.html"><tt>set-id-range</tt></a>, function</td></tr><tr><td valign="top"><a href="cl-sphinx-search__fun__set-limits.html"><tt>set-limits</tt></a>, function</td></tr><tr><td valign="top"><a href="cl-sphinx-search__fun__set-select.html"><tt>set-select</tt></a>, function</td></tr><tr><td valign="top"><a href="cl-sphinx-search__fun__set-server.html"><tt>set-server</tt></a>, function</td></tr></table></td></tr></table></div></body></html>
View
10 doc/pages/cl-sphinx-search__fun__geo-anchor.html
@@ -0,0 +1,10 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
+<html><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8"><title>Function geo-anchor</title><link rel="stylesheet" type="text/css" href="../index.css"><meta http-equiv="Content-Type" content="text/html; charset=UTF-8"></head><body><div id="header"><table cellspacing="0" cellpadding="0" width="100%"><tr><td valign="center">
+   
+ <b> Common Lisp Sphinx Search API</b></td><td valign="center" align="right"><b>API documentation</b></td></tr></table></div><div class="main"><div class="padded"><p class="noindent">
+ Package:
+ <a href="cl-sphinx-search.html">cl-sphinx-search</a></p><h2 class="page-title">
+ Function
+ geo-anchor</h2></div><div class="padded"><h3>Lambda List</h3><div class="indent"><tt>geo-anchor</tt> (<b>object</b>)</div><p style="color: red; font-weight: bold">
+ No documentation string. Possibly unimplemented or incomplete.
+ </p></div></div></body></html>
View
11 doc/pages/cl-sphinx-search__fun__reset-filters.html
@@ -0,0 +1,11 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
+<html><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8"><title>Function reset-filters</title><link rel="stylesheet" type="text/css" href="../index.css"><meta http-equiv="Content-Type" content="text/html; charset=UTF-8"></head><body><div id="header"><table cellspacing="0" cellpadding="0" width="100%"><tr><td valign="center">
+   
+ <b> Common Lisp Sphinx Search API</b></td><td valign="center" align="right"><b>API documentation</b></td></tr></table></div><div class="main"><div class="padded"><p class="noindent">
+ Package:
+ <a href="cl-sphinx-search.html">cl-sphinx-search</a></p><h2 class="page-title">
+ Function
+ reset-filters</h2></div><table cellspacing="0" cellpadding="0" width="100%"><tr><td valign="top" width="60%"><div class="padded"><h3>Lambda List</h3><div class="indent"><tt>reset-filters</tt> (<b>client</b>)</div><h3>Arguments</h3><div class="indent"><ul><li><tt>client</tt> -- a <a href="cl-sphinx-search__class__sphinx-client.html"><tt>sphinx-client</tt></a></li></ul></div><h3>Return Value</h3><div class="indent">client</div><h3>Details<a name="details"></a></h3><div class="indent"> Reset the filters.<br><br>
+ Clear all filters, including the geolocation anchor point.</div></div></td><td valign="top" width="5%">
+  
+ </td><td valign="top" width="35%"><h3>See also</h3><div class="indent"><table cellspacing="0" cellpadding="0"><tr><td><a href="cl-sphinx-search__class__sphinx-client.html"><tt>sphinx-client</tt></a></td></tr></table></div></td></tr></table></div></body></html>
View
10 doc/pages/cl-sphinx-search__fun__reset-group-by.html
@@ -0,0 +1,10 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
+<html><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8"><title>Function reset-group-by</title><link rel="stylesheet" type="text/css" href="../index.css"><meta http-equiv="Content-Type" content="text/html; charset=UTF-8"></head><body><div id="header"><table cellspacing="0" cellpadding="0" width="100%"><tr><td valign="center">
+   
+ <b> Common Lisp Sphinx Search API</b></td><td valign="center" align="right"><b>API documentation</b></td></tr></table></div><div class="main"><div class="padded"><p class="noindent">
+ Package:
+ <a href="cl-sphinx-search.html">cl-sphinx-search</a></p><h2 class="page-title">
+ Function
+ reset-group-by</h2></div><table cellspacing="0" cellpadding="0" width="100%"><tr><td valign="top" width="60%"><div class="padded"><h3>Lambda List</h3><div class="indent"><tt>reset-group-by</tt> (<b>client</b>)</div><h3>Arguments</h3><div class="indent"><ul><li><tt>client</tt> -- a <a href="cl-sphinx-search__class__sphinx-client.html"><tt>sphinx-client</tt></a></li></ul></div><h3>Return Value</h3><div class="indent">client</div><h3>Details<a name="details"></a></h3><div class="indent"> Clear all the group-by settings.</div></div></td><td valign="top" width="5%">
+  
+ </td><td valign="top" width="35%"><h3>See also</h3><div class="indent"><table cellspacing="0" cellpadding="0"><tr><td><a href="cl-sphinx-search__class__sphinx-client.html"><tt>sphinx-client</tt></a></td></tr></table></div></td></tr></table></div></body></html>
View
10 doc/pages/cl-sphinx-search__fun__reset-overrides.html
@@ -0,0 +1,10 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
+<html><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8"><title>Function reset-overrides</title><link rel="stylesheet" type="text/css" href="../index.css"><meta http-equiv="Content-Type" content="text/html; charset=UTF-8"></head><body><div id="header"><table cellspacing="0" cellpadding="0" width="100%"><tr><td valign="center">
+   
+ <b> Common Lisp Sphinx Search API</b></td><td valign="center" align="right"><b>API documentation</b></td></tr></table></div><div class="main"><div class="padded"><p class="noindent">
+ Package:
+ <a href="cl-sphinx-search.html">cl-sphinx-search</a></p><h2 class="page-title">
+ Function
+ reset-overrides</h2></div><table cellspacing="0" cellpadding="0" width="100%"><tr><td valign="top" width="60%"><div class="padded"><h3>Lambda List</h3><div class="indent"><tt>reset-overrides</tt> (<b>client</b>)</div><h3>Arguments</h3><div class="indent"><ul><li><tt>client</tt> -- a <a href="cl-sphinx-search__class__sphinx-client.html"><tt>sphinx-client</tt></a></li></ul></div><h3>Return Value</h3><div class="indent">client</div><h3>Details<a name="details"></a></h3><div class="indent"> Clear all attribute value overrides.</div></div></td><td valign="top" width="5%">
+  
+ </td><td valign="top" width="35%"><h3>See also</h3><div class="indent"><table cellspacing="0" cellpadding="0"><tr><td><a href="cl-sphinx-search__class__sphinx-client.html"><tt>sphinx-client</tt></a></td></tr></table></div></td></tr></table></div></body></html>
View
19 doc/pages/cl-sphinx-search__fun__set-geo-anchor.html
@@ -0,0 +1,19 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
+<html><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8"><title>Function set-geo-anchor</title><link rel="stylesheet" type="text/css" href="../index.css"><meta http-equiv="Content-Type" content="text/html; charset=UTF-8"></head><body><div id="header"><table cellspacing="0" cellpadding="0" width="100%"><tr><td valign="center">
+   
+ <b> Common Lisp Sphinx Search API</b></td><td valign="center" align="right"><b>API documentation</b></td></tr></table></div><div class="main"><div class="padded"><p class="noindent">
+ Package:
+ <a href="cl-sphinx-search.html">cl-sphinx-search</a></p><h2 class="page-title">
+ Function
+ set-geo-anchor</h2></div><table cellspacing="0" cellpadding="0" width="100%"><tr><td valign="top" width="60%"><div class="padded"><h3>Lambda List</h3><div class="indent"><tt>set-geo-anchor</tt> (<b>client</b> <b>latitude-attribute</b> <b>latitude</b> <b>longitude-attribute</b> <b>longitude</b>)</div><h3>Arguments</h3><div class="indent"><ul><li><tt>client</tt> -- a <a href="cl-sphinx-search__class__sphinx-client.html"><tt>sphinx-client</tt></a></li><li><tt>latitude-attribute</tt> -- the latitude attribute name</li><li><tt>latitude</tt> -- latitude in radians</li><li><tt>longitude-attribute</tt> -- the longitude attribute name</li><li><tt>longitude</tt> -- longitude in radians</li></ul></div><h3>Return Value</h3><div class="indent">client</div><h3>Details<a name="details"></a></h3><div class="indent"> Setup anchor point for geolocation.<br><br> <pre>
+ (set-geo-anchor client &quot;latitude_attr&quot; 45.231 &quot;longitude_attribute&quot; 4.5) </pre><br><br>
+ Setup anchor point for using geosphere distance calculations in
+ filters and sorting. Distance will be computed with respect to
+ this point, and will be included in result output.<br><br>
+ To actually use this to filter on results a certain distance from
+ the anchor point, use something like:<br><br> <pre>
+ (set-filter-float-range sph &quot;geodist&quot; 0 5000) </pre><br><br>
+ This will filter the results to be closer than 5 km from the anchor
+ point.</div></div></td><td valign="top" width="5%">
+  
+ </td><td valign="top" width="35%"><h3>See also</h3><div class="indent"><table cellspacing="0" cellpadding="0"><tr><td><a href="cl-sphinx-search__class__sphinx-client.html"><tt>sphinx-client</tt></a></td></tr></table></div></td></tr></table></div></body></html>
View
35 doc/pages/cl-sphinx-search__fun__set-group-by.html
@@ -0,0 +1,35 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
+<html><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8"><title>Function set-group-by</title><link rel="stylesheet" type="text/css" href="../index.css"><meta http-equiv="Content-Type" content="text/html; charset=UTF-8"></head><body><div id="header"><table cellspacing="0" cellpadding="0" width="100%"><tr><td valign="center">
+   
+ <b> Common Lisp Sphinx Search API</b></td><td valign="center" align="right"><b>API documentation</b></td></tr></table></div><div class="main"><div class="padded"><p class="noindent">
+ Package:
+ <a href="cl-sphinx-search.html">cl-sphinx-search</a></p><h2 class="page-title">
+ Function
+ set-group-by</h2></div><table cellspacing="0" cellpadding="0" width="100%"><tr><td valign="top" width="60%"><div class="padded"><h3>Lambda List</h3><div class="indent"><tt>set-group-by</tt> (<b>client</b> <b>attribute</b> <b>function</b> <b>&amp;optional</b> <b>group-sort</b>)</div><h3>Arguments</h3><div class="indent"><ul><li><tt>client</tt> -- a <a href="cl-sphinx-search__class__sphinx-client.html"><tt>sphinx-client</tt></a></li><li><tt>attribute</tt> -- the attribute name to group by</li><li><tt>function</tt> -- the grouping function to use</li><li><tt>group-sort</tt> -- the sorting clause for group-by</li></ul></div><h3>Return Value</h3><div class="indent">client</div><h3>Details<a name="details"></a></h3><div class="indent"> Set grouping options.<br><br> <pre>
+ (set-group-by client &quot;whatever_attr&quot; +sph-groupby-attr+ &quot;group asc&quot;)
+ (set-group-by client &quot;date_attr&quot; +sph-groupby-day+) </pre><br><br>
+ Sets attribute and function of results grouping.<br><br>
+ In grouping mode, all matches are assigned to different groups based on
+ grouping function value. Each group keeps track of the total match
+ count, and the best match (in this group) according to current sorting
+ function. The final result set contains one best match per group, with
+ grouping function value and matches count attached.<br><br> <tt>attribute</tt> is any valid attribute. Use <a href="cl-sphinx-search__fun__reset-group-by.html"><tt>reset-group-by</tt></a>
+ to disable grouping.<br><br> <tt>function</tt> is one of:<br><br> <dl><dt>+sph-groupby-day+</dt><dd> : Group by day (assumes timestamp type attribute of form YYYYMMDD)</dd><dt>+sph-groupby-week+</dt><dd> : Group by week (assumes timestamp type attribute of form YYYYNNN)</dd><dt>+sph-groupby-month+</dt><dd> : Group by month (assumes timestamp type attribute of form YYYYMM)</dd><dt>+sph-groupby-year+</dt><dd> : Group by year (assumes timestamp type attribute of form YYYY)</dd><dt>+sph-groupby-attr+</dt><dd> : Group by attribute value</dd><dt>+sph-groupby-attrpair+</dt><dd> : Group by two attributes, being the given
+ attribute and the attribute that immediately follows it in the sequence
+ of indexed attributes. The specified attribute may therefore not be the last of the indexed attributes</dd></dl><br style="clear: both;"><br><br>
+ Groups in the set of results can be sorted by any SQL-like sorting clause,
+ including both document attributes and the following special internal
+ Sphinx attributes:<br><br> <dl><dt>id</dt><dd> : document ID</dd><dt>weight, rank, relevance</dt><dd> : match weight</dd><dt>group</dt><dd> : group by function value</dd><dt>count</dt><dd> : number of matches in group</dd></dl><br style="clear: both;"><br><br>
+ The default mode is to sort by group-by value in descending order,
+ ie. by &quot;group desc&quot;.<br><br> In the results set, <tt>total-found</tt> contains the total amount of
+ matching groups over the whole index.<br><br>
+ WARNING: grouping is done in fixed memory and thus its results
+ are only approximate; so there might be more groups reported in <tt>total-found</tt> than actually present. <tt>count</tt> might
+ also be underestimated.<br><br>
+ For example, if sorting by relevance and grouping by a &quot;published&quot;
+ attribute with +sph-groupby-day+ function, then the result set will
+ contain only the most relevant match for each day when there were any
+ matches published, with day number and per-day match count attached,
+ and sorted by day number in descending order (ie. recent days first).</div></div></td><td valign="top" width="5%">
+  
+ </td><td valign="top" width="35%"><h3>See also</h3><div class="indent"><table cellspacing="0" cellpadding="0"><tr><td><a href="cl-sphinx-search__class__sphinx-client.html"><tt>sphinx-client</tt></a></td></tr><tr><td><a href="cl-sphinx-search__fun__reset-group-by.html"><tt>reset-group-by</tt></a></td></tr></table></div></td></tr></table></div></body></html>
View
10 doc/pages/cl-sphinx-search__fun__set-group-distinct.html
@@ -0,0 +1,10 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
+<html><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8"><title>Function set-group-distinct</title><link rel="stylesheet" type="text/css" href="../index.css"><meta http-equiv="Content-Type" content="text/html; charset=UTF-8"></head><body><div id="header"><table cellspacing="0" cellpadding="0" width="100%"><tr><td valign="center">
+   
+ <b> Common Lisp Sphinx Search API</b></td><td valign="center" align="right"><b>API documentation</b></td></tr></table></div><div class="main"><div class="padded"><p class="noindent">
+ Package:
+ <a href="cl-sphinx-search.html">cl-sphinx-search</a></p><h2 class="page-title">
+ Function
+ set-group-distinct</h2></div><table cellspacing="0" cellpadding="0" width="100%"><tr><td valign="top" width="60%"><div class="padded"><h3>Lambda List</h3><div class="indent"><tt>set-group-distinct</tt> (<b>client</b> <b>attribute</b>)</div><h3>Arguments</h3><div class="indent"><ul><li><tt>client</tt> -- a <a href="cl-sphinx-search__class__sphinx-client.html"><tt>sphinx-client</tt></a></li><li><tt>attribute</tt> -- the attribute to use for count-distinct queries</li></ul></div><h3>Return Value</h3><div class="indent">client</div><h3>Details<a name="details"></a></h3><div class="indent"> Set count-distinct attribute for group-by queries.</div></div></td><td valign="top" width="5%">
+  
+ </td><td valign="top" width="35%"><h3>See also</h3><div class="indent"><table cellspacing="0" cellpadding="0"><tr><td><a href="cl-sphinx-search__class__sphinx-client.html"><tt>sphinx-client</tt></a></td></tr></table></div></td></tr></table></div></body></html>
View
16 doc/pages/cl-sphinx-search__fun__set-override.html
@@ -0,0 +1,16 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
+<html><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8"><title>Function set-override</title><link rel="stylesheet" type="text/css" href="../index.css"><meta http-equiv="Content-Type" content="text/html; charset=UTF-8"></head><body><div id="header"><table cellspacing="0" cellpadding="0" width="100%"><tr><td valign="center">
+   
+ <b> Common Lisp Sphinx Search API</b></td><td valign="center" align="right"><b>API documentation</b></td></tr></table></div><div class="main"><div class="padded"><p class="noindent">
+ Package:
+ <a href="cl-sphinx-search.html">cl-sphinx-search</a></p><h2 class="page-title">
+ Function
+ set-override</h2></div><table cellspacing="0" cellpadding="0" width="100%"><tr><td valign="top" width="60%"><div class="padded"><h3>Lambda List</h3><div class="indent"><tt>set-override</tt> (<b>client</b> <b>attribute</b> <b>type</b> <b>values</b>)</div><h3>Arguments</h3><div class="indent"><ul><li><tt>client</tt> -- a <a href="cl-sphinx-search__class__sphinx-client.html"><tt>sphinx-client</tt></a></li><li><tt>attribute</tt> -- the attribute to override</li><li><tt>type</tt> -- the attribute type as defined in Sphinx config</li><li><tt>values</tt> -- an alist mapping document IDs to attribute values</li></ul></div><h3>Return Value</h3><div class="indent">client</div><h3>Details<a name="details"></a></h3><div class="indent"> Set attribute values overrides.<br><br>
+ There can be only one override per attribute.<br><br> <tt>values</tt> must be an alist that maps document IDs to attribute
+ values.<br><br> <pre>
+ (set-override client &quot;test_attr&quot; +sph-attr-integer+ '((4314 . 3) (2443 . 2))) </pre><br><br>
+ In the example above, for the document with ID 4314, Sphinx will see an attribute value for the <tt>attribute</tt> called 'test_attr' of 3. And
+ for the document with ID 2443 it will see 2, while the rest will be what
+ it was when the indexer was last run.</div></div></td><td valign="top" width="5%">
+  
+ </td><td valign="top" width="35%"><h3>See also</h3><div class="indent"><table cellspacing="0" cellpadding="0"><tr><td><a href="cl-sphinx-search__class__sphinx-client.html"><tt>sphinx-client</tt></a></td></tr></table></div></td></tr></table></div></body></html>
View
29 doc/pages/cl-sphinx-search__fun__set-select.html
@@ -0,0 +1,29 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
+<html><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8"><title>Function set-select</title><link rel="stylesheet" type="text/css" href="../index.css"><meta http-equiv="Content-Type" content="text/html; charset=UTF-8"></head><body><div id="header"><table cellspacing="0" cellpadding="0" width="100%"><tr><td valign="center">
+   
+ <b> Common Lisp Sphinx Search API</b></td><td valign="center" align="right"><b>API documentation</b></td></tr></table></div><div class="main"><div class="padded"><p class="noindent">
+ Package:
+ <a href="cl-sphinx-search.html">cl-sphinx-search</a></p><h2 class="page-title">
+ Function
+ set-select</h2></div><table cellspacing="0" cellpadding="0" width="100%"><tr><td valign="top" width="60%"><div class="padded"><h3>Lambda List</h3><div class="indent"><tt>set-select</tt> (<b>client</b> <b>select</b>)</div><h3>Arguments</h3><div class="indent"><ul><li><tt>client</tt> -- a <a href="cl-sphinx-search__class__sphinx-client.html"><tt>sphinx-client</tt></a></li><li><tt>select</tt> -- the select string</li></ul></div><h3>Return Value</h3><div class="indent">client</div><h3>Details<a name="details"></a></h3><div class="indent"> Set the select clause.<br><br>
+ Sets the select clause, listing specific attributes to fetch, and
+ expressions to compute and fetch. Clause syntax mimics SQL.<br><br>
+ The select clause is very similar to the part of a typical SQL query between <tt>SELECT</tt> and <tt>FROM</tt>. It lets you choose what
+ attributes (columns) to fetch, and also what expressions over the
+ columns to compute and fetch. A difference from SQL is that expressions
+ must always be aliased to a correct identifier (consisting of letters
+ and digits) using the 'AS' keyword. Sphinx enforces aliases so that the
+ computation results can be returned under a 'normal' name in the result
+ set, used in other clauses, etc.<br><br>
+ Everything else is basically identical to SQL. Star ('*') is supported.
+ Functions are supported. Arbitrary amount of expressions is supported.
+ Computed expressions can be used for sorting, filtering, and grouping,
+ just as the regular attributes.<br><br>
+ Aggregate functions (AVG(), MIN(), MAX(), SUM()) are supported when
+ using GROUP BY.<br><br>
+ Examples:<br><br> <pre>
+ (set-select sph &quot;*, (user_karma+ln(pageviews))*0.1 AS myweight&quot; )
+ (set-select sph &quot;exp_years, salary_gbp*{$gbp_usd_rate} AS salary_usd, IF(age&gt;40,1,0) AS over40&quot; )
+ (set-select sph &quot;*, AVG(price) AS avgprice&quot; ) </pre></div></div></td><td valign="top" width="5%">
+  
+ </td><td valign="top" width="35%"><h3>See also</h3><div class="indent"><table cellspacing="0" cellpadding="0"><tr><td><a href="cl-sphinx-search__class__sphinx-client.html"><tt>sphinx-client</tt></a></td></tr></table></div></td></tr></table></div></body></html>
View
10 doc/pages/cl-sphinx-search__variable__+sph-sort-functions+.html
@@ -0,0 +1,10 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
+<html><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8"><title>Variable +sph-sort-functions+</title><link rel="stylesheet" type="text/css" href="../index.css"><meta http-equiv="Content-Type" content="text/html; charset=UTF-8"></head><body><div id="header"><table cellspacing="0" cellpadding="0" width="100%"><tr><td valign="center">
+   
+ <b> Common Lisp Sphinx Search API</b></td><td valign="center" align="right"><b>API documentation</b></td></tr></table></div><div class="main"><div class="padded"><p class="noindent">
+ Package:
+ <a href="cl-sphinx-search.html">cl-sphinx-search</a></p><h2 class="page-title">
+ Variable
+ +sph-sort-functions+</h2><p style="color: red; font-weight: bold">
+ No documentation string. Possibly unimplemented or incomplete.
+ </p></div></div></body></html>
View
12 package.lisp
@@ -17,7 +17,14 @@
#:set-filter
#:set-filter-range
#:set-filter-float-range
- #:max-query-time)
+ #:max-query-time
+ #:set-geo-anchor
+ #:set-group-by
+ #:set-group-distinct
+ #:set-select
+ #:reset-filters
+ #:reset-group-by
+ #:reset-overrides)
(:documentation
"This package provides an interface to the search daemon (@em{searchd})
for @a[http://www.sphinxsearch.com/]{Sphinx}.
@@ -94,7 +101,4 @@
@end{section}
-
-
"))
-
View
26 perl-ex/Sphinx.pm
@@ -2019,23 +2019,23 @@ sub UpdateAttributes {
Returns 1 on success, 0 on failure.
- =cut
+=cut
- sub Open {
- my $self = shift;
+sub Open {
+ my $self = shift;
- if ($self->{_socket}) {
- $self->_Error("already connected");
- return 0;
- }
- my $fp = $self->_Connect() or return 0;
+ if ($self->{_socket}) {
+ $self->_Error("already connected");
+ return 0;
+ }
+ my $fp = $self->_Connect() or return 0;
- my $req = pack("nnNN", SEARCHD_COMMAND_PERSIST, 0, 4, 1);
- $self->_Send($fp, $req) or return 0;
+ my $req = pack("nnNN", SEARCHD_COMMAND_PERSIST, 0, 4, 1);
+ $self->_Send($fp, $req) or return 0;
- $self->{_socket} = $fp;
- return 1;
- }
+ $self->{_socket} = $fp;
+ return 1;
+}
=head2 Close
Please sign in to comment.
Something went wrong with that request. Please try again.