mirror of
https://github.com/sigmasternchen/php-doc-en
synced 2025-03-16 00:48:54 +00:00
add sphinx docs
git-svn-id: https://svn.php.net/repository/phpdoc/en/trunk@263491 c90b9560-bf6c-de11-be94-00142212c4b1
This commit is contained in:
parent
685a03b4b3
commit
eb2b986b68
37 changed files with 3322 additions and 0 deletions
48
reference/sphinx/book.xml
Normal file
48
reference/sphinx/book.xml
Normal file
|
@ -0,0 +1,48 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!-- $Revision: 1.1 $ -->
|
||||
|
||||
<book xml:id="book.sphinx" xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink">
|
||||
<title>Sphinx Client</title>
|
||||
<titleabbrev>Sphinx</titleabbrev>
|
||||
|
||||
<preface xml:id="intro.sphinx">
|
||||
&reftitle.intro;
|
||||
<para>
|
||||
This extension provides bindings for Sphinx search client library.
|
||||
Sphinx is a standalone search engine meant to provide fast,
|
||||
size-efficient and relevant fulltext search functions to other
|
||||
applications. Sphinx was specially designed to integrate well with
|
||||
SQL databases and scripting languages.
|
||||
Both Sphinx and its client library can be obtained from the
|
||||
<link xlink:href="&url.sphinx;">official site</link>
|
||||
</para>
|
||||
</preface>
|
||||
|
||||
&reference.sphinx.setup;
|
||||
&reference.sphinx.constants;
|
||||
&reference.sphinx.examples;
|
||||
&reference.sphinx.sphinxclient;
|
||||
|
||||
</book>
|
||||
|
||||
<!-- Keep this comment at the end of the file
|
||||
Local variables:
|
||||
mode: sgml
|
||||
sgml-omittag:t
|
||||
sgml-shorttag:t
|
||||
sgml-minimize-attributes:nil
|
||||
sgml-always-quote-attributes:t
|
||||
sgml-indent-step:1
|
||||
sgml-indent-data:t
|
||||
indent-tabs-mode:nil
|
||||
sgml-parent-document:nil
|
||||
sgml-default-dtd-file:"../../../manual.ced"
|
||||
sgml-exposed-tags:nil
|
||||
sgml-local-catalogs:nil
|
||||
sgml-local-ecat-files:nil
|
||||
End:
|
||||
vim600: syn=xml fen fdm=syntax fdl=2 si
|
||||
vim: et tw=78 syn=sgml
|
||||
vi: ts=1 sw=1
|
||||
-->
|
||||
|
40
reference/sphinx/configure.xml
Normal file
40
reference/sphinx/configure.xml
Normal file
|
@ -0,0 +1,40 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!-- $Revision: 1.1 $ -->
|
||||
|
||||
<section xml:id="sphinx.installation" xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink">
|
||||
&reftitle.install;
|
||||
<para>
|
||||
&pecl.info;
|
||||
<link
|
||||
xlink:href="http://pecl.php.net/package/sphinx">http://pecl.php.net/package/sphinx</link>
|
||||
</para>
|
||||
<para>
|
||||
If <filename>./configure</filename> is having trouble finding the
|
||||
libsphinxclient files (for example, it was installed into a custom
|
||||
prefix directory), use <userinput>./configure
|
||||
--with-sphinx=$PREFIX</userinput>, where $PREFIX is installation prefix of
|
||||
libsphinxclient.
|
||||
</para>
|
||||
</section>
|
||||
|
||||
|
||||
<!-- Keep this comment at the end of the file
|
||||
Local variables:
|
||||
mode: sgml
|
||||
sgml-omittag:t
|
||||
sgml-shorttag:t
|
||||
sgml-minimize-attributes:nil
|
||||
sgml-always-quote-attributes:t
|
||||
sgml-indent-step:1
|
||||
sgml-indent-data:t
|
||||
indent-tabs-mode:nil
|
||||
sgml-parent-document:nil
|
||||
sgml-default-dtd-file:"../../../manual.ced"
|
||||
sgml-exposed-tags:nil
|
||||
sgml-local-catalogs:nil
|
||||
sgml-local-ecat-files:nil
|
||||
End:
|
||||
vim600: syn=xml fen fdm=syntax fdl=2 si
|
||||
vim: et tw=78 syn=sgml
|
||||
vi: ts=1 sw=1
|
||||
-->
|
393
reference/sphinx/constants.xml
Normal file
393
reference/sphinx/constants.xml
Normal file
|
@ -0,0 +1,393 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!-- $Revision: 1.1 $ -->
|
||||
|
||||
<appendix xml:id="sphinx.constants" xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink">
|
||||
&reftitle.constants;
|
||||
&extension.constants;
|
||||
<para>
|
||||
<variablelist>
|
||||
<varlistentry>
|
||||
<term>
|
||||
<constant>SEARCHD_OK</constant>
|
||||
(<type>integer</type>)
|
||||
</term>
|
||||
<listitem>
|
||||
<simpara>
|
||||
</simpara>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term>
|
||||
<constant>SEARCHD_ERROR</constant>
|
||||
(<type>integer</type>)
|
||||
</term>
|
||||
<listitem>
|
||||
<simpara>
|
||||
</simpara>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term>
|
||||
<constant>SEARCHD_RETRY</constant>
|
||||
(<type>integer</type>)
|
||||
</term>
|
||||
<listitem>
|
||||
<simpara>
|
||||
</simpara>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term>
|
||||
<constant>SEARCHD_WARNING</constant>
|
||||
(<type>integer</type>)
|
||||
</term>
|
||||
<listitem>
|
||||
<simpara>
|
||||
</simpara>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term>
|
||||
<constant>SPH_MATCH_ALL</constant>
|
||||
(<type>integer</type>)
|
||||
</term>
|
||||
<listitem>
|
||||
<simpara>
|
||||
</simpara>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term>
|
||||
<constant>SPH_MATCH_ANY</constant>
|
||||
(<type>integer</type>)
|
||||
</term>
|
||||
<listitem>
|
||||
<simpara>
|
||||
</simpara>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term>
|
||||
<constant>SPH_MATCH_PHRASE</constant>
|
||||
(<type>integer</type>)
|
||||
</term>
|
||||
<listitem>
|
||||
<simpara>
|
||||
</simpara>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term>
|
||||
<constant>SPH_MATCH_BOOLEAN</constant>
|
||||
(<type>integer</type>)
|
||||
</term>
|
||||
<listitem>
|
||||
<simpara>
|
||||
</simpara>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term>
|
||||
<constant>SPH_MATCH_EXTENDED</constant>
|
||||
(<type>integer</type>)
|
||||
</term>
|
||||
<listitem>
|
||||
<simpara>
|
||||
</simpara>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term>
|
||||
<constant>SPH_MATCH_FULLSCAN</constant>
|
||||
(<type>integer</type>)
|
||||
</term>
|
||||
<listitem>
|
||||
<simpara>
|
||||
</simpara>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term>
|
||||
<constant>SPH_MATCH_EXTENDED2</constant>
|
||||
(<type>integer</type>)
|
||||
</term>
|
||||
<listitem>
|
||||
<simpara>
|
||||
</simpara>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term>
|
||||
<constant>SPH_RANK_PROXIMITY_BM25</constant>
|
||||
(<type>integer</type>)
|
||||
</term>
|
||||
<listitem>
|
||||
<simpara>
|
||||
</simpara>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term>
|
||||
<constant>SPH_RANK_BM25</constant>
|
||||
(<type>integer</type>)
|
||||
</term>
|
||||
<listitem>
|
||||
<simpara>
|
||||
</simpara>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term>
|
||||
<constant>SPH_RANK_NONE</constant>
|
||||
(<type>integer</type>)
|
||||
</term>
|
||||
<listitem>
|
||||
<simpara>
|
||||
</simpara>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term>
|
||||
<constant>SPH_RANK_WORDCOUNT</constant>
|
||||
(<type>integer</type>)
|
||||
</term>
|
||||
<listitem>
|
||||
<simpara>
|
||||
</simpara>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term>
|
||||
<constant>SPH_SORT_RELEVANCE</constant>
|
||||
(<type>integer</type>)
|
||||
</term>
|
||||
<listitem>
|
||||
<simpara>
|
||||
</simpara>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term>
|
||||
<constant>SPH_SORT_ATTR_DESC</constant>
|
||||
(<type>integer</type>)
|
||||
</term>
|
||||
<listitem>
|
||||
<simpara>
|
||||
</simpara>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term>
|
||||
<constant>SPH_SORT_ATTR_ASC</constant>
|
||||
(<type>integer</type>)
|
||||
</term>
|
||||
<listitem>
|
||||
<simpara>
|
||||
</simpara>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term>
|
||||
<constant>SPH_SORT_TIME_SEGMENTS</constant>
|
||||
(<type>integer</type>)
|
||||
</term>
|
||||
<listitem>
|
||||
<simpara>
|
||||
</simpara>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term>
|
||||
<constant>SPH_SORT_EXTENDED</constant>
|
||||
(<type>integer</type>)
|
||||
</term>
|
||||
<listitem>
|
||||
<simpara>
|
||||
</simpara>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term>
|
||||
<constant>SPH_SORT_EXPR</constant>
|
||||
(<type>integer</type>)
|
||||
</term>
|
||||
<listitem>
|
||||
<simpara>
|
||||
</simpara>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term>
|
||||
<constant>SPH_FILTER_VALUES</constant>
|
||||
(<type>integer</type>)
|
||||
</term>
|
||||
<listitem>
|
||||
<simpara>
|
||||
</simpara>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term>
|
||||
<constant>SPH_FILTER_RANGE</constant>
|
||||
(<type>integer</type>)
|
||||
</term>
|
||||
<listitem>
|
||||
<simpara>
|
||||
</simpara>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term>
|
||||
<constant>SPH_FILTER_FLOATRANGE</constant>
|
||||
(<type>integer</type>)
|
||||
</term>
|
||||
<listitem>
|
||||
<simpara>
|
||||
</simpara>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term>
|
||||
<constant>SPH_ATTR_INTEGER</constant>
|
||||
(<type>integer</type>)
|
||||
</term>
|
||||
<listitem>
|
||||
<simpara>
|
||||
</simpara>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term>
|
||||
<constant>SPH_ATTR_TIMESTAMP</constant>
|
||||
(<type>integer</type>)
|
||||
</term>
|
||||
<listitem>
|
||||
<simpara>
|
||||
</simpara>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term>
|
||||
<constant>SPH_ATTR_ORDINAL</constant>
|
||||
(<type>integer</type>)
|
||||
</term>
|
||||
<listitem>
|
||||
<simpara>
|
||||
</simpara>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term>
|
||||
<constant>SPH_ATTR_BOOL</constant>
|
||||
(<type>integer</type>)
|
||||
</term>
|
||||
<listitem>
|
||||
<simpara>
|
||||
</simpara>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term>
|
||||
<constant>SPH_ATTR_FLOAT</constant>
|
||||
(<type>integer</type>)
|
||||
</term>
|
||||
<listitem>
|
||||
<simpara>
|
||||
</simpara>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term>
|
||||
<constant>SPH_ATTR_MULTI</constant>
|
||||
(<type>integer</type>)
|
||||
</term>
|
||||
<listitem>
|
||||
<simpara>
|
||||
</simpara>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term>
|
||||
<constant>SPH_GROUPBY_DAY</constant>
|
||||
(<type>integer</type>)
|
||||
</term>
|
||||
<listitem>
|
||||
<simpara>
|
||||
</simpara>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term>
|
||||
<constant>SPH_GROUPBY_WEEK</constant>
|
||||
(<type>integer</type>)
|
||||
</term>
|
||||
<listitem>
|
||||
<simpara>
|
||||
</simpara>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term>
|
||||
<constant>SPH_GROUPBY_MONTH</constant>
|
||||
(<type>integer</type>)
|
||||
</term>
|
||||
<listitem>
|
||||
<simpara>
|
||||
</simpara>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term>
|
||||
<constant>SPH_GROUPBY_YEAR</constant>
|
||||
(<type>integer</type>)
|
||||
</term>
|
||||
<listitem>
|
||||
<simpara>
|
||||
</simpara>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term>
|
||||
<constant>SPH_GROUPBY_ATTR</constant>
|
||||
(<type>integer</type>)
|
||||
</term>
|
||||
<listitem>
|
||||
<simpara>
|
||||
</simpara>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term>
|
||||
<constant>SPH_GROUPBY_ATTRPAIR</constant>
|
||||
(<type>integer</type>)
|
||||
</term>
|
||||
<listitem>
|
||||
<simpara>
|
||||
</simpara>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
</variablelist>
|
||||
</para>
|
||||
</appendix>
|
||||
|
||||
<!-- Keep this comment at the end of the file
|
||||
Local variables:
|
||||
mode: sgml
|
||||
sgml-omittag:t
|
||||
sgml-shorttag:t
|
||||
sgml-minimize-attributes:nil
|
||||
sgml-always-quote-attributes:t
|
||||
sgml-indent-step:1
|
||||
sgml-indent-data:t
|
||||
indent-tabs-mode:nil
|
||||
sgml-parent-document:nil
|
||||
sgml-default-dtd-file:"../../../manual.ced"
|
||||
sgml-exposed-tags:nil
|
||||
sgml-local-catalogs:nil
|
||||
sgml-local-ecat-files:nil
|
||||
End:
|
||||
vim600: syn=xml fen fdm=syntax fdl=2 si
|
||||
vim: et tw=78 syn=sgml
|
||||
vi: ts=1 sw=1
|
||||
-->
|
||||
|
99
reference/sphinx/examples.xml
Normal file
99
reference/sphinx/examples.xml
Normal file
|
@ -0,0 +1,99 @@
|
|||
<?xml version="1.0" encoding="iso-8859-1"?>
|
||||
<!-- $Revision: 1.1 $ -->
|
||||
|
||||
<chapter xml:id="sphinx.examples" xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink">
|
||||
&reftitle.examples;
|
||||
<example>
|
||||
<title>Basic usage example</title>
|
||||
<programlisting role="php">
|
||||
<![CDATA[
|
||||
<?php
|
||||
|
||||
$s = new SphinxClient;
|
||||
$s->setServer("localhost", 6712);
|
||||
$s->setMatchMode(SPH_MATCH_ANY);
|
||||
$s->setMaxQueryTime(3);
|
||||
|
||||
$result = $s->query("test");
|
||||
|
||||
var_dump($result);
|
||||
|
||||
?>
|
||||
]]>
|
||||
</programlisting>
|
||||
&example.outputs.similar;
|
||||
<screen>
|
||||
<![CDATA[
|
||||
array(10) {
|
||||
["error"]=>
|
||||
string(0) ""
|
||||
["warning"]=>
|
||||
string(0) ""
|
||||
["status"]=>
|
||||
int(0)
|
||||
["fields"]=>
|
||||
array(3) {
|
||||
[0]=>
|
||||
string(7) "subject"
|
||||
[1]=>
|
||||
string(4) "body"
|
||||
[2]=>
|
||||
string(6) "author"
|
||||
}
|
||||
["attrs"]=>
|
||||
array(0) {
|
||||
}
|
||||
["matches"]=>
|
||||
array(1) {
|
||||
[3]=>
|
||||
array(2) {
|
||||
["weight"]=>
|
||||
int(1)
|
||||
["attrs"]=>
|
||||
array(0) {
|
||||
}
|
||||
}
|
||||
}
|
||||
["total"]=>
|
||||
int(1)
|
||||
["total_found"]=>
|
||||
int(1)
|
||||
["time"]=>
|
||||
float(0)
|
||||
["words"]=>
|
||||
array(1) {
|
||||
["to"]=>
|
||||
array(2) {
|
||||
["docs"]=>
|
||||
int(1)
|
||||
["hits"]=>
|
||||
int(1)
|
||||
}
|
||||
}
|
||||
}
|
||||
]]>
|
||||
</screen>
|
||||
</example>
|
||||
</chapter>
|
||||
|
||||
<!-- Keep this comment at the end of the file
|
||||
Local variables:
|
||||
mode: sgml
|
||||
sgml-omittag:t
|
||||
sgml-shorttag:t
|
||||
sgml-minimize-attributes:nil
|
||||
sgml-always-quote-attributes:t
|
||||
sgml-indent-step:1
|
||||
sgml-indent-data:t
|
||||
indent-tabs-mode:nil
|
||||
sgml-parent-document:nil
|
||||
sgml-default-dtd-file:"../../../manual.ced"
|
||||
sgml-exposed-tags:nil
|
||||
sgml-local-catalogs:nil
|
||||
sgml-local-ecat-files:nil
|
||||
End:
|
||||
vim600: syn=xml fen fdm=syntax fdl=2 si
|
||||
vim: et tw=78 syn=sgml
|
||||
vi: ts=1 sw=1
|
||||
-->
|
||||
|
31
reference/sphinx/reference.xml
Normal file
31
reference/sphinx/reference.xml
Normal file
|
@ -0,0 +1,31 @@
|
|||
<?xml version="1.0" encoding="iso-8859-1"?>
|
||||
<!-- $Revision: 1.1 $ -->
|
||||
|
||||
<reference xml:id="ref.sphinx" xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink">
|
||||
<title>Sphinx &Functions;</title>
|
||||
|
||||
&reference.sphinx.entities.functions;
|
||||
|
||||
</reference>
|
||||
|
||||
<!-- Keep this comment at the end of the file
|
||||
Local variables:
|
||||
mode: sgml
|
||||
sgml-omittag:t
|
||||
sgml-shorttag:t
|
||||
sgml-minimize-attributes:nil
|
||||
sgml-always-quote-attributes:t
|
||||
sgml-indent-step:1
|
||||
sgml-indent-data:t
|
||||
indent-tabs-mode:nil
|
||||
sgml-parent-document:nil
|
||||
sgml-default-dtd-file:"../../../manual.ced"
|
||||
sgml-exposed-tags:nil
|
||||
sgml-local-catalogs:nil
|
||||
sgml-local-ecat-files:nil
|
||||
End:
|
||||
vim600: syn=xml fen fdm=syntax fdl=2 si
|
||||
vim: et tw=78 syn=sgml
|
||||
vi: ts=1 sw=1
|
||||
-->
|
||||
|
52
reference/sphinx/setup.xml
Normal file
52
reference/sphinx/setup.xml
Normal file
|
@ -0,0 +1,52 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!-- $Revision: 1.1 $ -->
|
||||
|
||||
<chapter xml:id="sphinx.setup" xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink">
|
||||
&reftitle.setup;
|
||||
|
||||
<section xml:id="sphinx.requirements">
|
||||
&reftitle.required;
|
||||
<para>
|
||||
PECL/swish requires PHP 5.1.3 or newer.
|
||||
</para>
|
||||
</section>
|
||||
|
||||
<!-- {{{ Installation -->
|
||||
&reference.sphinx.configure;
|
||||
<!-- }}} -->
|
||||
|
||||
<!-- {{{ Configuration -->
|
||||
<section xml:id="sphinx.configuration">
|
||||
&reftitle.runtime;
|
||||
&no.config;
|
||||
</section>
|
||||
<!-- }}} -->
|
||||
|
||||
<section xml:id="sphinx.resources">
|
||||
&reftitle.resources;
|
||||
&no.resource;
|
||||
</section>
|
||||
|
||||
</chapter>
|
||||
|
||||
<!-- Keep this comment at the end of the file
|
||||
Local variables:
|
||||
mode: sgml
|
||||
sgml-omittag:t
|
||||
sgml-shorttag:t
|
||||
sgml-minimize-attributes:nil
|
||||
sgml-always-quote-attributes:t
|
||||
sgml-indent-step:1
|
||||
sgml-indent-data:t
|
||||
indent-tabs-mode:nil
|
||||
sgml-parent-document:nil
|
||||
sgml-default-dtd-file:"../../../manual.ced"
|
||||
sgml-exposed-tags:nil
|
||||
sgml-local-catalogs:nil
|
||||
sgml-local-ecat-files:nil
|
||||
End:
|
||||
vim600: syn=xml fen fdm=syntax fdl=2 si
|
||||
vim: et tw=78 syn=sgml
|
||||
vi: ts=1 sw=1
|
||||
-->
|
||||
|
66
reference/sphinx/sphinxclient.xml
Normal file
66
reference/sphinx/sphinxclient.xml
Normal file
|
@ -0,0 +1,66 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!-- $Revision: 1.1 $ -->
|
||||
|
||||
<reference xml:id="class.sphinxclient" xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:xi="http://www.w3.org/2001/XInclude">
|
||||
<title>The SphinxClient class</title>
|
||||
<titleabbrev>SphinxClient</titleabbrev>
|
||||
|
||||
<partintro>
|
||||
|
||||
<!-- {{{ SphinxClient intro -->
|
||||
<section xml:id="sphinxclient.intro">
|
||||
&reftitle.intro;
|
||||
<para>
|
||||
The SphinxClient class provides object-oriented interface to Sphinx.
|
||||
</para>
|
||||
</section>
|
||||
<!-- }}} -->
|
||||
|
||||
<section xml:id="sphinxclient.synopsis">
|
||||
&reftitle.classsynopsis;
|
||||
|
||||
<!-- {{{ Synopsis -->
|
||||
<classsynopsis>
|
||||
<ooclass><classname>SphinxClient</classname></ooclass>
|
||||
|
||||
<!-- {{{ Class synopsis -->
|
||||
<classsynopsisinfo>
|
||||
<ooclass>
|
||||
<classname>SphinxClient</classname>
|
||||
</ooclass>
|
||||
</classsynopsisinfo>
|
||||
<!-- }}} -->
|
||||
|
||||
<classsynopsisinfo role="comment">Methods</classsynopsisinfo>
|
||||
<xi:include xpointer="xmlns(db=http://docbook.org/ns/docbook) xpointer(id('class.sphinxclient')/db:refentry/db:refsect1[@role='description']/descendant::db:methodsynopsis[1])" />
|
||||
</classsynopsis>
|
||||
<!-- }}} -->
|
||||
|
||||
</section>
|
||||
|
||||
</partintro>
|
||||
|
||||
&reference.sphinx.entities.sphinxclient;
|
||||
|
||||
</reference>
|
||||
|
||||
<!-- Keep this comment at the end of the file
|
||||
Local variables:
|
||||
mode: sgml
|
||||
sgml-omittag:t
|
||||
sgml-shorttag:t
|
||||
sgml-minimize-attributes:nil
|
||||
sgml-always-quote-attributes:t
|
||||
sgml-indent-step:1
|
||||
sgml-indent-data:t
|
||||
indent-tabs-mode:nil
|
||||
sgml-parent-document:nil
|
||||
sgml-default-dtd-file:"manual.ced"
|
||||
sgml-exposed-tags:nil
|
||||
sgml-local-catalogs:nil
|
||||
sgml-local-ecat-files:nil
|
||||
End:
|
||||
vim600: syn=xml fen fdm=syntax fdl=2 si
|
||||
vim: et tw=78 syn=sgml
|
||||
vi: ts=1 sw=1
|
||||
-->
|
94
reference/sphinx/sphinxclient/addquery.xml
Normal file
94
reference/sphinx/sphinxclient/addquery.xml
Normal file
|
@ -0,0 +1,94 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!-- $Revision: 1.1 $ -->
|
||||
|
||||
<refentry xml:id="sphinxclient.addquery" xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink">
|
||||
<refnamediv>
|
||||
<refname>SphinxClient::addQuery</refname>
|
||||
<refpurpose>Add query to multi-query batch</refpurpose>
|
||||
</refnamediv>
|
||||
|
||||
<refsect1 role="description">
|
||||
&reftitle.description;
|
||||
<methodsynopsis>
|
||||
<modifier>public</modifier> <type>int</type><methodname>SphinxClient::addQuery</methodname>
|
||||
<methodparam><type>string</type><parameter>query</parameter></methodparam>
|
||||
<methodparam choice="opt"><type>string</type><parameter>index</parameter></methodparam>
|
||||
<methodparam choice="opt"><type>string</type><parameter>comment</parameter></methodparam>
|
||||
</methodsynopsis>
|
||||
<para>
|
||||
Adds query with the current settings to multi-query batch. This method
|
||||
doesn't affect current settings (sorting, filtering, grouping etc.) in any way.
|
||||
</para>
|
||||
</refsect1>
|
||||
|
||||
<refsect1 role="parameters">
|
||||
&reftitle.parameters;
|
||||
<para>
|
||||
<variablelist>
|
||||
<varlistentry>
|
||||
<term><parameter>query</parameter></term>
|
||||
<listitem>
|
||||
<para>
|
||||
Query string.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term><parameter>index</parameter></term>
|
||||
<listitem>
|
||||
<para>
|
||||
An index name (or names).
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term><parameter>comment</parameter></term>
|
||||
<listitem>
|
||||
<para>
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
</variablelist>
|
||||
</para>
|
||||
</refsect1>
|
||||
|
||||
<refsect1 role="returnvalues">
|
||||
&reftitle.returnvalues;
|
||||
<para>
|
||||
Returns an index in an array of results that will be returned
|
||||
by <xref linkend="sphinxclient.runqueries" /> call or false on error.
|
||||
</para>
|
||||
</refsect1>
|
||||
|
||||
<refsect1 role="seealso">
|
||||
&reftitle.seealso;
|
||||
<para>
|
||||
<simplelist>
|
||||
<member><xref linkend="sphinxclient.runqueries" /></member>
|
||||
<member><xref linkend="sphinxclient.query" /></member>
|
||||
</simplelist>
|
||||
</para>
|
||||
</refsect1>
|
||||
|
||||
</refentry>
|
||||
|
||||
<!-- Keep this comment at the end of the file
|
||||
Local variables:
|
||||
mode: sgml
|
||||
sgml-omittag:t
|
||||
sgml-shorttag:t
|
||||
sgml-minimize-attributes:nil
|
||||
sgml-always-quote-attributes:t
|
||||
sgml-indent-step:1
|
||||
sgml-indent-data:t
|
||||
indent-tabs-mode:nil
|
||||
sgml-parent-document:nil
|
||||
sgml-default-dtd-file:"../../../../manual.ced"
|
||||
sgml-exposed-tags:nil
|
||||
sgml-local-catalogs:nil
|
||||
sgml-local-ecat-files:nil
|
||||
End:
|
||||
vim600: syn=xml fen fdm=syntax fdl=2 si
|
||||
vim: et tw=78 syn=sgml
|
||||
vi: ts=1 sw=1
|
||||
-->
|
136
reference/sphinx/sphinxclient/buildexcerpts.xml
Normal file
136
reference/sphinx/sphinxclient/buildexcerpts.xml
Normal file
|
@ -0,0 +1,136 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!-- $Revision: 1.1 $ -->
|
||||
|
||||
<refentry xml:id="sphinxclient.buildexcerpts" xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink">
|
||||
<refnamediv>
|
||||
<refname>SphinxClient::buildExcerpts</refname>
|
||||
<refpurpose>Build text snippets</refpurpose>
|
||||
</refnamediv>
|
||||
|
||||
<refsect1 role="description">
|
||||
&reftitle.description;
|
||||
<methodsynopsis>
|
||||
<modifier>public</modifier> <type>array</type><methodname>SphinxClient::buildExcerpts</methodname>
|
||||
<methodparam><type>array</type><parameter>docs</parameter></methodparam>
|
||||
<methodparam><type>string</type><parameter>index</parameter></methodparam>
|
||||
<methodparam><type>string</type><parameter>words</parameter></methodparam>
|
||||
<methodparam choice="opt"><type>array</type><parameter>opts</parameter></methodparam>
|
||||
</methodsynopsis>
|
||||
<para>
|
||||
Connects to searchd, requests it to generate excerpts (snippets) from the
|
||||
given documents, and returns the results.
|
||||
</para>
|
||||
</refsect1>
|
||||
|
||||
<refsect1 role="parameters">
|
||||
&reftitle.parameters;
|
||||
<para>
|
||||
<variablelist>
|
||||
<varlistentry>
|
||||
<term><parameter>docs</parameter></term>
|
||||
<listitem>
|
||||
<para>
|
||||
Array of strings with documents' contents.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term><parameter>index</parameter></term>
|
||||
<listitem>
|
||||
<para>
|
||||
Index name.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term><parameter>words</parameter></term>
|
||||
<listitem>
|
||||
<para>
|
||||
Keywords to highlight.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term><parameter>opts</parameter></term>
|
||||
<listitem>
|
||||
<para>
|
||||
Associative array of additional highlighting options (see below).
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
</variablelist>
|
||||
|
||||
<table>
|
||||
<title>Highlighting options</title>
|
||||
<tgroup cols="2">
|
||||
<thead>
|
||||
<row>
|
||||
<entry>Option</entry>
|
||||
<entry>Description</entry>
|
||||
</row>
|
||||
</thead>
|
||||
<tbody>
|
||||
<row>
|
||||
<entry>"before_match"</entry>
|
||||
<entry>A string to insert before a keyword match. Default is "<b>".</entry>
|
||||
</row>
|
||||
<row>
|
||||
<entry>"after_match"</entry>
|
||||
<entry>A string to insert after a keyword match. Default is "</b>".</entry>
|
||||
</row>
|
||||
<row>
|
||||
<entry>"chunk_separator"</entry>
|
||||
<entry>A string to insert between snippet chunks (passages). Default is " ... ".</entry>
|
||||
</row>
|
||||
<row>
|
||||
<entry>"limit"</entry>
|
||||
<entry>Maximum snippet size, in symbols (codepoints). Integer, default is 256.</entry>
|
||||
</row>
|
||||
<row>
|
||||
<entry>"around"</entry>
|
||||
<entry>How much words to pick around each matching keywords block. Integer, default is 5.</entry>
|
||||
</row>
|
||||
<row>
|
||||
<entry>"exact_phrase"</entry>
|
||||
<entry>Whether to highlight exact query phrase matches only instead of
|
||||
individual keywords. Boolean, default is &false;.</entry>
|
||||
</row>
|
||||
<row>
|
||||
<entry>"single_passage"</entry>
|
||||
<entry>Whether to extract single best passage only. Boolean, default is &false;.</entry>
|
||||
</row>
|
||||
</tbody>
|
||||
</tgroup>
|
||||
</table>
|
||||
</para>
|
||||
</refsect1>
|
||||
|
||||
<refsect1 role="returnvalues">
|
||||
&reftitle.returnvalues;
|
||||
<para>
|
||||
Returns array of snippets on success, or &false; on failure.
|
||||
</para>
|
||||
</refsect1>
|
||||
|
||||
</refentry>
|
||||
|
||||
<!-- Keep this comment at the end of the file
|
||||
Local variables:
|
||||
mode: sgml
|
||||
sgml-omittag:t
|
||||
sgml-shorttag:t
|
||||
sgml-minimize-attributes:nil
|
||||
sgml-always-quote-attributes:t
|
||||
sgml-indent-step:1
|
||||
sgml-indent-data:t
|
||||
indent-tabs-mode:nil
|
||||
sgml-parent-document:nil
|
||||
sgml-default-dtd-file:"../../../../manual.ced"
|
||||
sgml-exposed-tags:nil
|
||||
sgml-local-catalogs:nil
|
||||
sgml-local-ecat-files:nil
|
||||
End:
|
||||
vim600: syn=xml fen fdm=syntax fdl=2 si
|
||||
vim: et tw=78 syn=sgml
|
||||
vi: ts=1 sw=1
|
||||
-->
|
86
reference/sphinx/sphinxclient/buildkeywords.xml
Normal file
86
reference/sphinx/sphinxclient/buildkeywords.xml
Normal file
|
@ -0,0 +1,86 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!-- $Revision: 1.1 $ -->
|
||||
|
||||
<refentry xml:id="sphinxclient.buildkeywords" xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink">
|
||||
<refnamediv>
|
||||
<refname>SphinxClient::buildKeywords</refname>
|
||||
<refpurpose>Extract keywords from query</refpurpose>
|
||||
</refnamediv>
|
||||
|
||||
<refsect1 role="description">
|
||||
&reftitle.description;
|
||||
<methodsynopsis>
|
||||
<modifier>public</modifier> <type>array</type><methodname>SphinxClient::buildKeywords</methodname>
|
||||
<methodparam><type>string</type><parameter>query</parameter></methodparam>
|
||||
<methodparam><type>string</type><parameter>index</parameter></methodparam>
|
||||
<methodparam><type>bool</type><parameter>hits</parameter></methodparam>
|
||||
</methodsynopsis>
|
||||
<para>
|
||||
Extracts keywords from <parameter>query</parameter> using tokenizer
|
||||
settings for the given <parameter>index</parameter>, optionally with
|
||||
per-keyword occurrence statistics.
|
||||
</para>
|
||||
</refsect1>
|
||||
|
||||
<refsect1 role="parameters">
|
||||
&reftitle.parameters;
|
||||
<para>
|
||||
<variablelist>
|
||||
<varlistentry>
|
||||
<term><parameter>query</parameter></term>
|
||||
<listitem>
|
||||
<para>
|
||||
A query to extract keywords from.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term><parameter>index</parameter></term>
|
||||
<listitem>
|
||||
<para>
|
||||
An index to get tokenizing settings and keyword occurrence statistics
|
||||
from.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term><parameter>hits</parameter></term>
|
||||
<listitem>
|
||||
<para>
|
||||
A boolean flag to enable/disable keyword statistics generation.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
</variablelist>
|
||||
</para>
|
||||
</refsect1>
|
||||
|
||||
<refsect1 role="returnvalues">
|
||||
&reftitle.returnvalues;
|
||||
<para>
|
||||
Returns an array of associative arrays with per-keyword information.
|
||||
</para>
|
||||
</refsect1>
|
||||
|
||||
</refentry>
|
||||
|
||||
<!-- Keep this comment at the end of the file
|
||||
Local variables:
|
||||
mode: sgml
|
||||
sgml-omittag:t
|
||||
sgml-shorttag:t
|
||||
sgml-minimize-attributes:nil
|
||||
sgml-always-quote-attributes:t
|
||||
sgml-indent-step:1
|
||||
sgml-indent-data:t
|
||||
indent-tabs-mode:nil
|
||||
sgml-parent-document:nil
|
||||
sgml-default-dtd-file:"../../../../manual.ced"
|
||||
sgml-exposed-tags:nil
|
||||
sgml-local-catalogs:nil
|
||||
sgml-local-ecat-files:nil
|
||||
End:
|
||||
vim600: syn=xml fen fdm=syntax fdl=2 si
|
||||
vim: et tw=78 syn=sgml
|
||||
vi: ts=1 sw=1
|
||||
-->
|
47
reference/sphinx/sphinxclient/construct.xml
Normal file
47
reference/sphinx/sphinxclient/construct.xml
Normal file
|
@ -0,0 +1,47 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!-- $Revision: 1.1 $ -->
|
||||
|
||||
<refentry xml:id="sphinxclient.construct" xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink">
|
||||
<refnamediv>
|
||||
<refname>SphinxClient::__construct</refname>
|
||||
<refpurpose>Create a new SphinxClient object</refpurpose>
|
||||
</refnamediv>
|
||||
|
||||
<refsect1 role="description">
|
||||
&reftitle.description;
|
||||
<methodsynopsis>
|
||||
<methodname>SphinxClient::__construct</methodname>
|
||||
<void />
|
||||
</methodsynopsis>
|
||||
<para>
|
||||
Creates a new <classname>SphinxClient</classname> object.
|
||||
</para>
|
||||
</refsect1>
|
||||
|
||||
<refsect1 role="parameters">
|
||||
&reftitle.parameters;
|
||||
&no.function.parameters;
|
||||
</refsect1>
|
||||
|
||||
</refentry>
|
||||
|
||||
<!-- Keep this comment at the end of the file
|
||||
Local variables:
|
||||
mode: sgml
|
||||
sgml-omittag:t
|
||||
sgml-shorttag:t
|
||||
sgml-minimize-attributes:nil
|
||||
sgml-always-quote-attributes:t
|
||||
sgml-indent-step:1
|
||||
sgml-indent-data:t
|
||||
indent-tabs-mode:nil
|
||||
sgml-parent-document:nil
|
||||
sgml-default-dtd-file:"../../../../manual.ced"
|
||||
sgml-exposed-tags:nil
|
||||
sgml-local-catalogs:nil
|
||||
sgml-local-ecat-files:nil
|
||||
End:
|
||||
vim600: syn=xml fen fdm=syntax fdl=2 si
|
||||
vim: et tw=78 syn=sgml
|
||||
vi: ts=1 sw=1
|
||||
-->
|
66
reference/sphinx/sphinxclient/escapestring.xml
Normal file
66
reference/sphinx/sphinxclient/escapestring.xml
Normal file
|
@ -0,0 +1,66 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!-- $Revision: 1.1 $ -->
|
||||
|
||||
<refentry xml:id="sphinxclient.escapestring" xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink">
|
||||
<refnamediv>
|
||||
<refname>SphinxClient::escapeString</refname>
|
||||
<refpurpose>Escape special characters</refpurpose>
|
||||
</refnamediv>
|
||||
|
||||
<refsect1 role="description">
|
||||
&reftitle.description;
|
||||
<methodsynopsis>
|
||||
<modifier>public</modifier> <type>string</type><methodname>SphinxClient::escapeString</methodname>
|
||||
<methodparam><type>string</type><parameter>string</parameter></methodparam>
|
||||
</methodsynopsis>
|
||||
<para>
|
||||
Escapes characters that are treated as special operators by the query
|
||||
language parser.
|
||||
</para>
|
||||
</refsect1>
|
||||
|
||||
<refsect1 role="parameters">
|
||||
&reftitle.parameters;
|
||||
<para>
|
||||
<variablelist>
|
||||
<varlistentry>
|
||||
<term><parameter>string</parameter></term>
|
||||
<listitem>
|
||||
<para>
|
||||
String to escape.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
</variablelist>
|
||||
</para>
|
||||
</refsect1>
|
||||
|
||||
<refsect1 role="returnvalues">
|
||||
&reftitle.returnvalues;
|
||||
<para>
|
||||
Returns escaped string.
|
||||
</para>
|
||||
</refsect1>
|
||||
|
||||
</refentry>
|
||||
|
||||
<!-- Keep this comment at the end of the file
|
||||
Local variables:
|
||||
mode: sgml
|
||||
sgml-omittag:t
|
||||
sgml-shorttag:t
|
||||
sgml-minimize-attributes:nil
|
||||
sgml-always-quote-attributes:t
|
||||
sgml-indent-step:1
|
||||
sgml-indent-data:t
|
||||
indent-tabs-mode:nil
|
||||
sgml-parent-document:nil
|
||||
sgml-default-dtd-file:"../../../../manual.ced"
|
||||
sgml-exposed-tags:nil
|
||||
sgml-local-catalogs:nil
|
||||
sgml-local-ecat-files:nil
|
||||
End:
|
||||
vim600: syn=xml fen fdm=syntax fdl=2 si
|
||||
vim: et tw=78 syn=sgml
|
||||
vi: ts=1 sw=1
|
||||
-->
|
58
reference/sphinx/sphinxclient/getlasterror.xml
Normal file
58
reference/sphinx/sphinxclient/getlasterror.xml
Normal file
|
@ -0,0 +1,58 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!-- $Revision: 1.1 $ -->
|
||||
|
||||
<refentry xml:id="sphinxclient.getlasterror" xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink">
|
||||
<refnamediv>
|
||||
<refname>SphinxClient::getLastError</refname>
|
||||
<refpurpose>Get the last error message</refpurpose>
|
||||
</refnamediv>
|
||||
|
||||
<refsect1 role="description">
|
||||
&reftitle.description;
|
||||
<methodsynopsis>
|
||||
<modifier>public</modifier> <type>string</type><methodname>SphinxClient::getLastError</methodname>
|
||||
<void />
|
||||
</methodsynopsis>
|
||||
<para>
|
||||
Returns string with the last error message. If there were no errors during
|
||||
the previous API call, empty string is returned. This method doesn't reset
|
||||
the error message, so you can safely call it several times.
|
||||
</para>
|
||||
</refsect1>
|
||||
|
||||
<refsect1 role="parameters">
|
||||
&reftitle.parameters;
|
||||
&no.function.parameters;
|
||||
</refsect1>
|
||||
|
||||
<refsect1 role="seealso">
|
||||
&reftitle.seealso;
|
||||
<para>
|
||||
<simplelist>
|
||||
<member><xref linkend="sphinxclient.getlastwarning" /></member>
|
||||
</simplelist>
|
||||
</para>
|
||||
</refsect1>
|
||||
|
||||
</refentry>
|
||||
|
||||
<!-- Keep this comment at the end of the file
|
||||
Local variables:
|
||||
mode: sgml
|
||||
sgml-omittag:t
|
||||
sgml-shorttag:t
|
||||
sgml-minimize-attributes:nil
|
||||
sgml-always-quote-attributes:t
|
||||
sgml-indent-step:1
|
||||
sgml-indent-data:t
|
||||
indent-tabs-mode:nil
|
||||
sgml-parent-document:nil
|
||||
sgml-default-dtd-file:"../../../../manual.ced"
|
||||
sgml-exposed-tags:nil
|
||||
sgml-local-catalogs:nil
|
||||
sgml-local-ecat-files:nil
|
||||
End:
|
||||
vim600: syn=xml fen fdm=syntax fdl=2 si
|
||||
vim: et tw=78 syn=sgml
|
||||
vi: ts=1 sw=1
|
||||
-->
|
58
reference/sphinx/sphinxclient/getlastwarning.xml
Normal file
58
reference/sphinx/sphinxclient/getlastwarning.xml
Normal file
|
@ -0,0 +1,58 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!-- $Revision: 1.1 $ -->
|
||||
|
||||
<refentry xml:id="sphinxclient.getlastwarning" xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink">
|
||||
<refnamediv>
|
||||
<refname>SphinxClient::getLastWarning</refname>
|
||||
<refpurpose>Get the last warning</refpurpose>
|
||||
</refnamediv>
|
||||
|
||||
<refsect1 role="description">
|
||||
&reftitle.description;
|
||||
<methodsynopsis>
|
||||
<modifier>public</modifier> <type>string</type><methodname>SphinxClient::getLastWarning</methodname>
|
||||
<void />
|
||||
</methodsynopsis>
|
||||
<para>
|
||||
Returns last warning message. If there were no warnings during
|
||||
the previous API call, empty string is returned. This method doesn't reset
|
||||
the warning, so you can safely call it several times.
|
||||
</para>
|
||||
</refsect1>
|
||||
|
||||
<refsect1 role="parameters">
|
||||
&reftitle.parameters;
|
||||
&no.function.parameters;
|
||||
</refsect1>
|
||||
|
||||
<refsect1 role="seealso">
|
||||
&reftitle.seealso;
|
||||
<para>
|
||||
<simplelist>
|
||||
<member><xref linkend="sphinxclient.getlasterror" /></member>
|
||||
</simplelist>
|
||||
</para>
|
||||
</refsect1>
|
||||
|
||||
</refentry>
|
||||
|
||||
<!-- Keep this comment at the end of the file
|
||||
Local variables:
|
||||
mode: sgml
|
||||
sgml-omittag:t
|
||||
sgml-shorttag:t
|
||||
sgml-minimize-attributes:nil
|
||||
sgml-always-quote-attributes:t
|
||||
sgml-indent-step:1
|
||||
sgml-indent-data:t
|
||||
indent-tabs-mode:nil
|
||||
sgml-parent-document:nil
|
||||
sgml-default-dtd-file:"../../../../manual.ced"
|
||||
sgml-exposed-tags:nil
|
||||
sgml-local-catalogs:nil
|
||||
sgml-local-ecat-files:nil
|
||||
End:
|
||||
vim600: syn=xml fen fdm=syntax fdl=2 si
|
||||
vim: et tw=78 syn=sgml
|
||||
vi: ts=1 sw=1
|
||||
-->
|
136
reference/sphinx/sphinxclient/query.xml
Normal file
136
reference/sphinx/sphinxclient/query.xml
Normal file
|
@ -0,0 +1,136 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!-- $Revision: 1.1 $ -->
|
||||
|
||||
<refentry xml:id="sphinxclient.query" xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink">
|
||||
<refnamediv>
|
||||
<refname>SphinxClient::query</refname>
|
||||
<refpurpose>Execute search query</refpurpose>
|
||||
</refnamediv>
|
||||
|
||||
<refsect1 role="description">
|
||||
&reftitle.description;
|
||||
<methodsynopsis>
|
||||
<modifier>public</modifier> <type>array</type><methodname>SphinxClient::query</methodname>
|
||||
<methodparam><type>string</type><parameter>query</parameter></methodparam>
|
||||
<methodparam choice="opt"><type>string</type><parameter>index</parameter></methodparam>
|
||||
<methodparam choice="opt"><type>string</type><parameter>comment</parameter></methodparam>
|
||||
</methodsynopsis>
|
||||
<para>
|
||||
Connects to searchd server, runs the given search query with the current settings,
|
||||
obtains and returns the result set.
|
||||
</para>
|
||||
</refsect1>
|
||||
|
||||
<refsect1 role="parameters">
|
||||
&reftitle.parameters;
|
||||
<para>
|
||||
<variablelist>
|
||||
<varlistentry>
|
||||
<term><parameter>query</parameter></term>
|
||||
<listitem>
|
||||
<para>
|
||||
Query string.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term><parameter>index</parameter></term>
|
||||
<listitem>
|
||||
<para>
|
||||
An index name (or names).
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term><parameter>comment</parameter></term>
|
||||
<listitem>
|
||||
<para>
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
</variablelist>
|
||||
</para>
|
||||
</refsect1>
|
||||
|
||||
<refsect1 role="returnvalues">
|
||||
&reftitle.returnvalues;
|
||||
<para>
|
||||
On success, <function>SphinxClient::query()</function> returns a list of
|
||||
found matches and additional per-query statistics. The result set is a
|
||||
hash utilize other structures instead of hash) with the following keys and
|
||||
values:
|
||||
<table>
|
||||
<title>Result set structure</title>
|
||||
<tgroup cols="2">
|
||||
<thead>
|
||||
<row>
|
||||
<entry>Key</entry>
|
||||
<entry>Value description</entry>
|
||||
</row>
|
||||
</thead>
|
||||
<tbody>
|
||||
<row>
|
||||
<entry>"matches"</entry>
|
||||
<entry>An array with found document IDs as keys and their weight and
|
||||
attributes values as values</entry>
|
||||
</row>
|
||||
<row>
|
||||
<entry>"total"</entry>
|
||||
<entry>Total number of matches found and retrieved (depends on your
|
||||
settings)</entry>
|
||||
</row>
|
||||
<row>
|
||||
<entry>"total_found"</entry>
|
||||
<entry>Total number of found documents matching the query</entry>
|
||||
</row>
|
||||
<row>
|
||||
<entry>"words"</entry>
|
||||
<entry>An array with words (case-folded and stemmed) as keys and
|
||||
per-word statistics as values</entry>
|
||||
</row>
|
||||
<row>
|
||||
<entry>"error"</entry>
|
||||
<entry>Query error message reported by searchd</entry>
|
||||
</row>
|
||||
<row>
|
||||
<entry>"warning"</entry>
|
||||
<entry>Query warning reported by searchd</entry>
|
||||
</row>
|
||||
</tbody>
|
||||
</tgroup>
|
||||
</table>
|
||||
</para>
|
||||
</refsect1>
|
||||
|
||||
<refsect1 role="seealso">
|
||||
&reftitle.seealso;
|
||||
<para>
|
||||
<simplelist>
|
||||
<member><xref linkend="sphinxclient.runqueries" /></member>
|
||||
<member><xref linkend="sphinxclient.addquery" /></member>
|
||||
</simplelist>
|
||||
</para>
|
||||
</refsect1>
|
||||
|
||||
</refentry>
|
||||
|
||||
<!-- Keep this comment at the end of the file
|
||||
Local variables:
|
||||
mode: sgml
|
||||
sgml-omittag:t
|
||||
sgml-shorttag:t
|
||||
sgml-minimize-attributes:nil
|
||||
sgml-always-quote-attributes:t
|
||||
sgml-indent-step:1
|
||||
sgml-indent-data:t
|
||||
indent-tabs-mode:nil
|
||||
sgml-parent-document:nil
|
||||
sgml-default-dtd-file:"../../../../manual.ced"
|
||||
sgml-exposed-tags:nil
|
||||
sgml-local-catalogs:nil
|
||||
sgml-local-ecat-files:nil
|
||||
End:
|
||||
vim600: syn=xml fen fdm=syntax fdl=2 si
|
||||
vim: et tw=78 syn=sgml
|
||||
vi: ts=1 sw=1
|
||||
-->
|
55
reference/sphinx/sphinxclient/resetfilters.xml
Normal file
55
reference/sphinx/sphinxclient/resetfilters.xml
Normal file
|
@ -0,0 +1,55 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!-- $Revision: 1.1 $ -->
|
||||
|
||||
<refentry xml:id="sphinxclient.resetfilters" xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink">
|
||||
<refnamediv>
|
||||
<refname>SphinxClient::resetFilters</refname>
|
||||
<refpurpose>Clear all filters</refpurpose>
|
||||
</refnamediv>
|
||||
|
||||
<refsect1 role="description">
|
||||
&reftitle.description;
|
||||
<methodsynopsis>
|
||||
<modifier>public</modifier> <type>void</type><methodname>SphinxClient::resetFilters</methodname>
|
||||
<void />
|
||||
</methodsynopsis>
|
||||
<para>
|
||||
Clears all currently set filters. This call is normally required when
|
||||
using multi-queries. You might want to set different filters for different
|
||||
queries in the batch. To do that, you should call
|
||||
<function>SphinxClient::resetFilters()</function> and add new filters using
|
||||
the respective calls.
|
||||
</para>
|
||||
</refsect1>
|
||||
|
||||
<refsect1 role="seealso">
|
||||
&reftitle.seealso;
|
||||
<para>
|
||||
<simplelist>
|
||||
<member><xref linkend="sphinxclient.resetgroupby" /></member>
|
||||
</simplelist>
|
||||
</para>
|
||||
</refsect1>
|
||||
|
||||
</refentry>
|
||||
|
||||
<!-- Keep this comment at the end of the file
|
||||
Local variables:
|
||||
mode: sgml
|
||||
sgml-omittag:t
|
||||
sgml-shorttag:t
|
||||
sgml-minimize-attributes:nil
|
||||
sgml-always-quote-attributes:t
|
||||
sgml-indent-step:1
|
||||
sgml-indent-data:t
|
||||
indent-tabs-mode:nil
|
||||
sgml-parent-document:nil
|
||||
sgml-default-dtd-file:"../../../../manual.ced"
|
||||
sgml-exposed-tags:nil
|
||||
sgml-local-catalogs:nil
|
||||
sgml-local-ecat-files:nil
|
||||
End:
|
||||
vim600: syn=xml fen fdm=syntax fdl=2 si
|
||||
vim: et tw=78 syn=sgml
|
||||
vi: ts=1 sw=1
|
||||
-->
|
52
reference/sphinx/sphinxclient/resetgroupby.xml
Normal file
52
reference/sphinx/sphinxclient/resetgroupby.xml
Normal file
|
@ -0,0 +1,52 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!-- $Revision: 1.1 $ -->
|
||||
|
||||
<refentry xml:id="sphinxclient.resetgroupby" xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink">
|
||||
<refnamediv>
|
||||
<refname>SphinxClient::resetGroupBy</refname>
|
||||
<refpurpose>Clear all group-by settings</refpurpose>
|
||||
</refnamediv>
|
||||
|
||||
<refsect1 role="description">
|
||||
&reftitle.description;
|
||||
<methodsynopsis>
|
||||
<modifier>public</modifier> <type>void</type><methodname>SphinxClient::resetGroupBy</methodname>
|
||||
<void />
|
||||
</methodsynopsis>
|
||||
<para>
|
||||
Clears all currently group-by settings, and disables group-by.
|
||||
This call is normally required only when using multi-queries.
|
||||
</para>
|
||||
</refsect1>
|
||||
|
||||
<refsect1 role="seealso">
|
||||
&reftitle.seealso;
|
||||
<para>
|
||||
<simplelist>
|
||||
<member><xref linkend="sphinxclient.resetgroupby" /></member>
|
||||
</simplelist>
|
||||
</para>
|
||||
</refsect1>
|
||||
|
||||
</refentry>
|
||||
|
||||
<!-- Keep this comment at the end of the file
|
||||
Local variables:
|
||||
mode: sgml
|
||||
sgml-omittag:t
|
||||
sgml-shorttag:t
|
||||
sgml-minimize-attributes:nil
|
||||
sgml-always-quote-attributes:t
|
||||
sgml-indent-step:1
|
||||
sgml-indent-data:t
|
||||
indent-tabs-mode:nil
|
||||
sgml-parent-document:nil
|
||||
sgml-default-dtd-file:"../../../../manual.ced"
|
||||
sgml-exposed-tags:nil
|
||||
sgml-local-catalogs:nil
|
||||
sgml-local-ecat-files:nil
|
||||
End:
|
||||
vim600: syn=xml fen fdm=syntax fdl=2 si
|
||||
vim: et tw=78 syn=sgml
|
||||
vi: ts=1 sw=1
|
||||
-->
|
60
reference/sphinx/sphinxclient/runqueries.xml
Normal file
60
reference/sphinx/sphinxclient/runqueries.xml
Normal file
|
@ -0,0 +1,60 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!-- $Revision: 1.1 $ -->
|
||||
|
||||
<refentry xml:id="sphinxclient.runqueries" xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink">
|
||||
<refnamediv>
|
||||
<refname>SphinxClient::runQueries</refname>
|
||||
<refpurpose>Run a batch of search queries</refpurpose>
|
||||
</refnamediv>
|
||||
|
||||
<refsect1 role="description">
|
||||
&reftitle.description;
|
||||
<methodsynopsis>
|
||||
<modifier>public</modifier> <type>array</type><methodname>SphinxClient::runQueries</methodname>
|
||||
<void />
|
||||
</methodsynopsis>
|
||||
<para>
|
||||
Connects to searchd, runs a batch of all queries added using <xref
|
||||
linkend="sphinxclient.addquery" />, obtains and returns the result sets.
|
||||
</para>
|
||||
</refsect1>
|
||||
|
||||
<refsect1 role="returnvalues">
|
||||
&reftitle.returnvalues;
|
||||
<para>
|
||||
Returns &false; on failure and array of result sets on success.
|
||||
</para>
|
||||
</refsect1>
|
||||
|
||||
<refsect1 role="seealso">
|
||||
&reftitle.seealso;
|
||||
<para>
|
||||
<simplelist>
|
||||
<member><xref linkend="sphinxclient.addquery" /></member>
|
||||
<member><xref linkend="sphinxclient.query" /></member>
|
||||
</simplelist>
|
||||
</para>
|
||||
</refsect1>
|
||||
|
||||
</refentry>
|
||||
|
||||
<!-- Keep this comment at the end of the file
|
||||
Local variables:
|
||||
mode: sgml
|
||||
sgml-omittag:t
|
||||
sgml-shorttag:t
|
||||
sgml-minimize-attributes:nil
|
||||
sgml-always-quote-attributes:t
|
||||
sgml-indent-step:1
|
||||
sgml-indent-data:t
|
||||
indent-tabs-mode:nil
|
||||
sgml-parent-document:nil
|
||||
sgml-default-dtd-file:"../../../../manual.ced"
|
||||
sgml-exposed-tags:nil
|
||||
sgml-local-catalogs:nil
|
||||
sgml-local-ecat-files:nil
|
||||
End:
|
||||
vim600: syn=xml fen fdm=syntax fdl=2 si
|
||||
vim: et tw=78 syn=sgml
|
||||
vi: ts=1 sw=1
|
||||
-->
|
70
reference/sphinx/sphinxclient/setarrayresult.xml
Normal file
70
reference/sphinx/sphinxclient/setarrayresult.xml
Normal file
|
@ -0,0 +1,70 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!-- $Revision: 1.1 $ -->
|
||||
|
||||
<refentry xml:id="sphinxclient.setarrayresult" xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink">
|
||||
<refnamediv>
|
||||
<refname>SphinxClient::setArrayResult</refname>
|
||||
<refpurpose>Change the format of result set array</refpurpose>
|
||||
</refnamediv>
|
||||
|
||||
<refsect1 role="description">
|
||||
&reftitle.description;
|
||||
<methodsynopsis>
|
||||
<modifier>public</modifier> <type>bool</type><methodname>SphinxClient::setArrayResult</methodname>
|
||||
<methodparam><type>bool</type><parameter>array_result</parameter></methodparam>
|
||||
</methodsynopsis>
|
||||
<para>
|
||||
Controls the format of search results set arrays (whether matches should
|
||||
be returned as an array or a hash).
|
||||
If <parameter>array_result</parameter> is &false; (default value), matches
|
||||
are returned as a hash with document IDs as keys, and other information (weight,
|
||||
attributes) as values. If <parameter>array_result</parameter> is &true;, matches
|
||||
are eturned as a plain array with complete per-match information including
|
||||
document IDs.
|
||||
</para>
|
||||
</refsect1>
|
||||
|
||||
<refsect1 role="parameters">
|
||||
&reftitle.parameters;
|
||||
<para>
|
||||
<variablelist>
|
||||
<varlistentry>
|
||||
<term><parameter>array_result</parameter></term>
|
||||
<listitem>
|
||||
<para>
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
</variablelist>
|
||||
</para>
|
||||
</refsect1>
|
||||
|
||||
<refsect1 role="returnvalues">
|
||||
&reftitle.returnvalues;
|
||||
<para>
|
||||
Always returns &true;.
|
||||
</para>
|
||||
</refsect1>
|
||||
|
||||
</refentry>
|
||||
|
||||
<!-- Keep this comment at the end of the file
|
||||
Local variables:
|
||||
mode: sgml
|
||||
sgml-omittag:t
|
||||
sgml-shorttag:t
|
||||
sgml-minimize-attributes:nil
|
||||
sgml-always-quote-attributes:t
|
||||
sgml-indent-step:1
|
||||
sgml-indent-data:t
|
||||
indent-tabs-mode:nil
|
||||
sgml-parent-document:nil
|
||||
sgml-default-dtd-file:"../../../../manual.ced"
|
||||
sgml-exposed-tags:nil
|
||||
sgml-local-catalogs:nil
|
||||
sgml-local-ecat-files:nil
|
||||
End:
|
||||
vim600: syn=xml fen fdm=syntax fdl=2 si
|
||||
vim: et tw=78 syn=sgml
|
||||
vi: ts=1 sw=1
|
||||
-->
|
74
reference/sphinx/sphinxclient/setconnecttimeout.xml
Normal file
74
reference/sphinx/sphinxclient/setconnecttimeout.xml
Normal file
|
@ -0,0 +1,74 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!-- $Revision: 1.1 $ -->
|
||||
|
||||
<refentry xml:id="sphinxclient.setconnecttimeout" xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink">
|
||||
<refnamediv>
|
||||
<refname>SphinxClient::setConnectTimeout</refname>
|
||||
<refpurpose>Set connection timeout</refpurpose>
|
||||
</refnamediv>
|
||||
|
||||
<refsect1 role="description">
|
||||
&reftitle.description;
|
||||
<methodsynopsis>
|
||||
<modifier>public</modifier> <type>bool</type><methodname>SphinxClient::setConnectTimeout</methodname>
|
||||
<methodparam><type>float</type><parameter>timeout</parameter></methodparam>
|
||||
</methodsynopsis>
|
||||
<para>
|
||||
Sets connection timeout (in seconds) for searchd connection.
|
||||
</para>
|
||||
</refsect1>
|
||||
|
||||
<refsect1 role="parameters">
|
||||
&reftitle.parameters;
|
||||
<para>
|
||||
<variablelist>
|
||||
<varlistentry>
|
||||
<term><parameter>timeout</parameter></term>
|
||||
<listitem>
|
||||
<para>
|
||||
Timeout in seconds.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
</variablelist>
|
||||
</para>
|
||||
</refsect1>
|
||||
|
||||
<refsect1 role="returnvalues">
|
||||
&reftitle.returnvalues;
|
||||
<para>
|
||||
&return.success;
|
||||
</para>
|
||||
</refsect1>
|
||||
|
||||
<refsect1 role="seealso">
|
||||
&reftitle.seealso;
|
||||
<para>
|
||||
<simplelist>
|
||||
<member><xref linkend="sphinxclient.setmaxquerytime" /></member>
|
||||
</simplelist>
|
||||
</para>
|
||||
</refsect1>
|
||||
|
||||
</refentry>
|
||||
|
||||
<!-- Keep this comment at the end of the file
|
||||
Local variables:
|
||||
mode: sgml
|
||||
sgml-omittag:t
|
||||
sgml-shorttag:t
|
||||
sgml-minimize-attributes:nil
|
||||
sgml-always-quote-attributes:t
|
||||
sgml-indent-step:1
|
||||
sgml-indent-data:t
|
||||
indent-tabs-mode:nil
|
||||
sgml-parent-document:nil
|
||||
sgml-default-dtd-file:"../../../../manual.ced"
|
||||
sgml-exposed-tags:nil
|
||||
sgml-local-catalogs:nil
|
||||
sgml-local-ecat-files:nil
|
||||
End:
|
||||
vim600: syn=xml fen fdm=syntax fdl=2 si
|
||||
vim: et tw=78 syn=sgml
|
||||
vi: ts=1 sw=1
|
||||
-->
|
85
reference/sphinx/sphinxclient/setfieldweights.xml
Normal file
85
reference/sphinx/sphinxclient/setfieldweights.xml
Normal file
|
@ -0,0 +1,85 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!-- $Revision: 1.1 $ -->
|
||||
|
||||
<refentry xml:id="sphinxclient.setfieldweights" xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink">
|
||||
<refnamediv>
|
||||
<refname>SphinxClient::setFieldWeights</refname>
|
||||
<refpurpose>Set field weights</refpurpose>
|
||||
</refnamediv>
|
||||
|
||||
<refsect1 role="description">
|
||||
&reftitle.description;
|
||||
<methodsynopsis>
|
||||
<modifier>public</modifier> <type>bool</type><methodname>SphinxClient::setFieldWeights</methodname>
|
||||
<methodparam><type>array</type><parameter>weights</parameter></methodparam>
|
||||
</methodsynopsis>
|
||||
<para>
|
||||
Binds per-field weights by name.
|
||||
</para>
|
||||
<para>
|
||||
Match ranking can be affected by per-field weights. See <link
|
||||
xlink:href="&url.sphinx;">Sphinx documentation</link> for an explanation
|
||||
on how phrase proximity ranking is affected. This call lets you specify
|
||||
non-default weights for full-text fields.
|
||||
</para>
|
||||
<para>
|
||||
The weights must be positive 32-bit integers, so be careful not to hit
|
||||
32-bit integer maximum. The final weight is a 32-bit integer too.
|
||||
Default weight value is 1. Unknown field names are silently ignored.
|
||||
</para>
|
||||
</refsect1>
|
||||
|
||||
<refsect1 role="parameters">
|
||||
&reftitle.parameters;
|
||||
<para>
|
||||
<variablelist>
|
||||
<varlistentry>
|
||||
<term><parameter>weights</parameter></term>
|
||||
<listitem>
|
||||
<para>
|
||||
Associative array of field names and field weights.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
</variablelist>
|
||||
</para>
|
||||
</refsect1>
|
||||
|
||||
<refsect1 role="returnvalues">
|
||||
&reftitle.returnvalues;
|
||||
<para>
|
||||
&return.success;
|
||||
</para>
|
||||
</refsect1>
|
||||
|
||||
<refsect1 role="seealso">
|
||||
&reftitle.seealso;
|
||||
<para>
|
||||
<simplelist>
|
||||
<member><xref linkend="sphinxclient.setindexweights" /></member>
|
||||
</simplelist>
|
||||
</para>
|
||||
</refsect1>
|
||||
|
||||
</refentry>
|
||||
|
||||
<!-- Keep this comment at the end of the file
|
||||
Local variables:
|
||||
mode: sgml
|
||||
sgml-omittag:t
|
||||
sgml-shorttag:t
|
||||
sgml-minimize-attributes:nil
|
||||
sgml-always-quote-attributes:t
|
||||
sgml-indent-step:1
|
||||
sgml-indent-data:t
|
||||
indent-tabs-mode:nil
|
||||
sgml-parent-document:nil
|
||||
sgml-default-dtd-file:"../../../../manual.ced"
|
||||
sgml-exposed-tags:nil
|
||||
sgml-local-catalogs:nil
|
||||
sgml-local-ecat-files:nil
|
||||
End:
|
||||
vim600: syn=xml fen fdm=syntax fdl=2 si
|
||||
vim: et tw=78 syn=sgml
|
||||
vi: ts=1 sw=1
|
||||
-->
|
95
reference/sphinx/sphinxclient/setfilter.xml
Normal file
95
reference/sphinx/sphinxclient/setfilter.xml
Normal file
|
@ -0,0 +1,95 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!-- $Revision: 1.1 $ -->
|
||||
|
||||
<refentry xml:id="sphinxclient.setfilter" xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink">
|
||||
<refnamediv>
|
||||
<refname>SphinxClient::setFilter</refname>
|
||||
<refpurpose>Add new integer values set filter</refpurpose>
|
||||
</refnamediv>
|
||||
|
||||
<refsect1 role="description">
|
||||
&reftitle.description;
|
||||
<methodsynopsis>
|
||||
<modifier>public</modifier> <type>bool</type><methodname>SphinxClient::setFilter</methodname>
|
||||
<methodparam><type>string</type><parameter>attribute</parameter></methodparam>
|
||||
<methodparam><type>array</type><parameter>values</parameter></methodparam>
|
||||
<methodparam choice="opt"><type>bool</type><parameter>exclude</parameter></methodparam>
|
||||
</methodsynopsis>
|
||||
<para>
|
||||
Adds new integer values set filter to the existing list of filters.
|
||||
</para>
|
||||
</refsect1>
|
||||
|
||||
<refsect1 role="parameters">
|
||||
&reftitle.parameters;
|
||||
<para>
|
||||
<variablelist>
|
||||
<varlistentry>
|
||||
<term><parameter>attribute</parameter></term>
|
||||
<listitem>
|
||||
<para>
|
||||
An attribute name.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term><parameter>values</parameter></term>
|
||||
<listitem>
|
||||
<para>
|
||||
Plain array of integer values.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term><parameter>exclude</parameter></term>
|
||||
<listitem>
|
||||
<para>
|
||||
If set to &true;, matching documents are excluded from the result set.
|
||||
Defaults to &false;.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
</variablelist>
|
||||
</para>
|
||||
</refsect1>
|
||||
|
||||
<refsect1 role="returnvalues">
|
||||
&reftitle.returnvalues;
|
||||
<para>
|
||||
&return.success;
|
||||
</para>
|
||||
</refsect1>
|
||||
|
||||
<refsect1 role="seealso">
|
||||
&reftitle.seealso;
|
||||
<para>
|
||||
<simplelist>
|
||||
<member><xref linkend="sphinxclient.setfilterfloatrange" /></member>
|
||||
<member><xref linkend="sphinxclient.setfilterrange" /></member>
|
||||
<member><xref linkend="sphinxclient.resetfilters" /></member>
|
||||
</simplelist>
|
||||
</para>
|
||||
</refsect1>
|
||||
|
||||
</refentry>
|
||||
|
||||
<!-- Keep this comment at the end of the file
|
||||
Local variables:
|
||||
mode: sgml
|
||||
sgml-omittag:t
|
||||
sgml-shorttag:t
|
||||
sgml-minimize-attributes:nil
|
||||
sgml-always-quote-attributes:t
|
||||
sgml-indent-step:1
|
||||
sgml-indent-data:t
|
||||
indent-tabs-mode:nil
|
||||
sgml-parent-document:nil
|
||||
sgml-default-dtd-file:"../../../../manual.ced"
|
||||
sgml-exposed-tags:nil
|
||||
sgml-local-catalogs:nil
|
||||
sgml-local-ecat-files:nil
|
||||
End:
|
||||
vim600: syn=xml fen fdm=syntax fdl=2 si
|
||||
vim: et tw=78 syn=sgml
|
||||
vi: ts=1 sw=1
|
||||
-->
|
109
reference/sphinx/sphinxclient/setfilterfloatrange.xml
Normal file
109
reference/sphinx/sphinxclient/setfilterfloatrange.xml
Normal file
|
@ -0,0 +1,109 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!-- $Revision: 1.1 $ -->
|
||||
|
||||
<refentry xml:id="sphinxclient.setfilterfloatrange" xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink">
|
||||
<refnamediv>
|
||||
<refname>SphinxClient::setFilterFloatRange</refname>
|
||||
<refpurpose>Add new float range filter</refpurpose>
|
||||
</refnamediv>
|
||||
|
||||
<refsect1 role="description">
|
||||
&reftitle.description;
|
||||
<methodsynopsis>
|
||||
<modifier>public</modifier> <type>bool</type><methodname>SphinxClient::setFilterFloatRange</methodname>
|
||||
<methodparam><type>string</type><parameter>attribute</parameter></methodparam>
|
||||
<methodparam><type>float</type><parameter>min</parameter></methodparam>
|
||||
<methodparam><type>float</type><parameter>max</parameter></methodparam>
|
||||
<methodparam choice="opt"><type>bool</type><parameter>exclude</parameter></methodparam>
|
||||
</methodsynopsis>
|
||||
<para>
|
||||
Adds new float range filter to the existing list of filters.
|
||||
Only those documents which have <parameter>attribute</parameter>
|
||||
value stored in the index between <parameter>min</parameter> and
|
||||
<parameter>max</parameter> (including values that are exactly equal
|
||||
to <parameter>min</parameter> or <parameter>max</parameter>) will
|
||||
be matched (or rejected, if <parameter>exclude</parameter> is &true;).
|
||||
</para>
|
||||
</refsect1>
|
||||
|
||||
<refsect1 role="parameters">
|
||||
&reftitle.parameters;
|
||||
<para>
|
||||
<variablelist>
|
||||
<varlistentry>
|
||||
<term><parameter>attribute</parameter></term>
|
||||
<listitem>
|
||||
<para>
|
||||
An attribute name.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term><parameter>min</parameter></term>
|
||||
<listitem>
|
||||
<para>
|
||||
Minimum value.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term><parameter>max</parameter></term>
|
||||
<listitem>
|
||||
<para>
|
||||
Maximum value.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term><parameter>exclude</parameter></term>
|
||||
<listitem>
|
||||
<para>
|
||||
If set to &true;, matching documents are excluded from the result set.
|
||||
Defaults to &false;.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
</variablelist>
|
||||
</para>
|
||||
</refsect1>
|
||||
|
||||
<refsect1 role="returnvalues">
|
||||
&reftitle.returnvalues;
|
||||
<para>
|
||||
&return.success;
|
||||
</para>
|
||||
</refsect1>
|
||||
|
||||
<refsect1 role="seealso">
|
||||
&reftitle.seealso;
|
||||
<para>
|
||||
<simplelist>
|
||||
<member><xref linkend="sphinxclient.setfilterrange" /></member>
|
||||
<member><xref linkend="sphinxclient.setfilter" /></member>
|
||||
<member><xref linkend="sphinxclient.resetfilters" /></member>
|
||||
</simplelist>
|
||||
</para>
|
||||
</refsect1>
|
||||
|
||||
</refentry>
|
||||
|
||||
<!-- Keep this comment at the end of the file
|
||||
Local variables:
|
||||
mode: sgml
|
||||
sgml-omittag:t
|
||||
sgml-shorttag:t
|
||||
sgml-minimize-attributes:nil
|
||||
sgml-always-quote-attributes:t
|
||||
sgml-indent-step:1
|
||||
sgml-indent-data:t
|
||||
indent-tabs-mode:nil
|
||||
sgml-parent-document:nil
|
||||
sgml-default-dtd-file:"../../../../manual.ced"
|
||||
sgml-exposed-tags:nil
|
||||
sgml-local-catalogs:nil
|
||||
sgml-local-ecat-files:nil
|
||||
End:
|
||||
vim600: syn=xml fen fdm=syntax fdl=2 si
|
||||
vim: et tw=78 syn=sgml
|
||||
vi: ts=1 sw=1
|
||||
-->
|
109
reference/sphinx/sphinxclient/setfilterrange.xml
Normal file
109
reference/sphinx/sphinxclient/setfilterrange.xml
Normal file
|
@ -0,0 +1,109 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!-- $Revision: 1.1 $ -->
|
||||
|
||||
<refentry xml:id="sphinxclient.setfilterrange" xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink">
|
||||
<refnamediv>
|
||||
<refname>SphinxClient::setFilterRange</refname>
|
||||
<refpurpose>Add new integer range filter</refpurpose>
|
||||
</refnamediv>
|
||||
|
||||
<refsect1 role="description">
|
||||
&reftitle.description;
|
||||
<methodsynopsis>
|
||||
<modifier>public</modifier> <type>bool</type><methodname>SphinxClient::setFilterRange</methodname>
|
||||
<methodparam><type>string</type><parameter>attribute</parameter></methodparam>
|
||||
<methodparam><type>int</type><parameter>min</parameter></methodparam>
|
||||
<methodparam><type>int</type><parameter>max</parameter></methodparam>
|
||||
<methodparam choice="opt"><type>bool</type><parameter>exclude</parameter></methodparam>
|
||||
</methodsynopsis>
|
||||
<para>
|
||||
Adds new integer range filter to the existing list of filters.
|
||||
Only those documents which have <parameter>attribute</parameter>
|
||||
value stored in the index between <parameter>min</parameter> and
|
||||
<parameter>max</parameter> (including values that are exactly equal
|
||||
to <parameter>min</parameter> or <parameter>max</parameter>) will
|
||||
be matched (or rejected, if <parameter>exclude</parameter> is &true;).
|
||||
</para>
|
||||
</refsect1>
|
||||
|
||||
<refsect1 role="parameters">
|
||||
&reftitle.parameters;
|
||||
<para>
|
||||
<variablelist>
|
||||
<varlistentry>
|
||||
<term><parameter>attribute</parameter></term>
|
||||
<listitem>
|
||||
<para>
|
||||
An attribute name.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term><parameter>min</parameter></term>
|
||||
<listitem>
|
||||
<para>
|
||||
Minimum value.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term><parameter>max</parameter></term>
|
||||
<listitem>
|
||||
<para>
|
||||
Maximum value.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term><parameter>exclude</parameter></term>
|
||||
<listitem>
|
||||
<para>
|
||||
If set to &true;, matching documents are excluded from the result set.
|
||||
Defaults to &false;.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
</variablelist>
|
||||
</para>
|
||||
</refsect1>
|
||||
|
||||
<refsect1 role="returnvalues">
|
||||
&reftitle.returnvalues;
|
||||
<para>
|
||||
&return.success;
|
||||
</para>
|
||||
</refsect1>
|
||||
|
||||
<refsect1 role="seealso">
|
||||
&reftitle.seealso;
|
||||
<para>
|
||||
<simplelist>
|
||||
<member><xref linkend="sphinxclient.setfilterfloatrange" /></member>
|
||||
<member><xref linkend="sphinxclient.setfilter" /></member>
|
||||
<member><xref linkend="sphinxclient.resetfilters" /></member>
|
||||
</simplelist>
|
||||
</para>
|
||||
</refsect1>
|
||||
|
||||
</refentry>
|
||||
|
||||
<!-- Keep this comment at the end of the file
|
||||
Local variables:
|
||||
mode: sgml
|
||||
sgml-omittag:t
|
||||
sgml-shorttag:t
|
||||
sgml-minimize-attributes:nil
|
||||
sgml-always-quote-attributes:t
|
||||
sgml-indent-step:1
|
||||
sgml-indent-data:t
|
||||
indent-tabs-mode:nil
|
||||
sgml-parent-document:nil
|
||||
sgml-default-dtd-file:"../../../../manual.ced"
|
||||
sgml-exposed-tags:nil
|
||||
sgml-local-catalogs:nil
|
||||
sgml-local-ecat-files:nil
|
||||
End:
|
||||
vim600: syn=xml fen fdm=syntax fdl=2 si
|
||||
vim: et tw=78 syn=sgml
|
||||
vi: ts=1 sw=1
|
||||
-->
|
109
reference/sphinx/sphinxclient/setgeoanchor.xml
Normal file
109
reference/sphinx/sphinxclient/setgeoanchor.xml
Normal file
|
@ -0,0 +1,109 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!-- $Revision: 1.1 $ -->
|
||||
|
||||
<refentry xml:id="sphinxclient.setgeoanchor" xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink">
|
||||
<refnamediv>
|
||||
<refname>SphinxClient::setGeoAnchor</refname>
|
||||
<refpurpose>Set anchor point for a geosphere distance calculations</refpurpose>
|
||||
</refnamediv>
|
||||
|
||||
<refsect1 role="description">
|
||||
&reftitle.description;
|
||||
<methodsynopsis>
|
||||
<modifier>public</modifier> <type>bool</type><methodname>SphinxClient::setGeoAnchor</methodname>
|
||||
<methodparam><type>string</type><parameter>attrlat</parameter></methodparam>
|
||||
<methodparam><type>string</type><parameter>attrlong</parameter></methodparam>
|
||||
<methodparam><type>float</type><parameter>latitude</parameter></methodparam>
|
||||
<methodparam><type>float</type><parameter>longitude</parameter></methodparam>
|
||||
</methodsynopsis>
|
||||
<para>
|
||||
Sets anchor point for a geosphere distance (geodistance) calculations
|
||||
and enables them.
|
||||
</para>
|
||||
<para>
|
||||
Once an anchor point is set, you can use magic "@geodist" attribute name in
|
||||
your filters and/or sorting expressions.
|
||||
</para>
|
||||
</refsect1>
|
||||
|
||||
<refsect1 role="parameters">
|
||||
&reftitle.parameters;
|
||||
<para>
|
||||
<variablelist>
|
||||
<varlistentry>
|
||||
<term><parameter>attrlat</parameter></term>
|
||||
<listitem>
|
||||
<para>
|
||||
Name of a latitude attribute.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term><parameter>attrlong</parameter></term>
|
||||
<listitem>
|
||||
<para>
|
||||
Name of a longitude attribute.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term><parameter>latitude</parameter></term>
|
||||
<listitem>
|
||||
<para>
|
||||
Anchor latitude in radians.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term><parameter>longitude</parameter></term>
|
||||
<listitem>
|
||||
<para>
|
||||
Anchor longitude in radians.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
</variablelist>
|
||||
</para>
|
||||
</refsect1>
|
||||
|
||||
<refsect1 role="returnvalues">
|
||||
&reftitle.returnvalues;
|
||||
<para>
|
||||
&return.success;
|
||||
</para>
|
||||
</refsect1>
|
||||
|
||||
<refsect1 role="seealso">
|
||||
&reftitle.seealso;
|
||||
<para>
|
||||
<simplelist>
|
||||
<member><xref linkend="sphinxclient.setfilterfloatrange" /></member>
|
||||
<member><xref linkend="sphinxclient.setfilterrange" /></member>
|
||||
<member><xref linkend="sphinxclient.setfilter" /></member>
|
||||
<member><xref linkend="sphinxclient.resetfilters" /></member>
|
||||
</simplelist>
|
||||
</para>
|
||||
</refsect1>
|
||||
|
||||
</refentry>
|
||||
|
||||
<!-- Keep this comment at the end of the file
|
||||
Local variables:
|
||||
mode: sgml
|
||||
sgml-omittag:t
|
||||
sgml-shorttag:t
|
||||
sgml-minimize-attributes:nil
|
||||
sgml-always-quote-attributes:t
|
||||
sgml-indent-step:1
|
||||
sgml-indent-data:t
|
||||
indent-tabs-mode:nil
|
||||
sgml-parent-document:nil
|
||||
sgml-default-dtd-file:"../../../../manual.ced"
|
||||
sgml-exposed-tags:nil
|
||||
sgml-local-catalogs:nil
|
||||
sgml-local-ecat-files:nil
|
||||
End:
|
||||
vim600: syn=xml fen fdm=syntax fdl=2 si
|
||||
vim: et tw=78 syn=sgml
|
||||
vi: ts=1 sw=1
|
||||
-->
|
103
reference/sphinx/sphinxclient/setgroupby.xml
Normal file
103
reference/sphinx/sphinxclient/setgroupby.xml
Normal file
|
@ -0,0 +1,103 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!-- $Revision: 1.1 $ -->
|
||||
|
||||
<refentry xml:id="sphinxclient.setgroupby" xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink">
|
||||
<refnamediv>
|
||||
<refname>SphinxClient::setGroupBy</refname>
|
||||
<refpurpose>Set grouping attribute</refpurpose>
|
||||
</refnamediv>
|
||||
|
||||
<refsect1 role="description">
|
||||
&reftitle.description;
|
||||
<methodsynopsis>
|
||||
<modifier>public</modifier> <type>bool</type><methodname>SphinxClient::setGroupBy</methodname>
|
||||
<methodparam><type>string</type><parameter>attribute</parameter></methodparam>
|
||||
<methodparam><type>int</type><parameter>func</parameter></methodparam>
|
||||
<methodparam choice="opt"><type>string</type><parameter>groupsort</parameter></methodparam>
|
||||
</methodsynopsis>
|
||||
<para>
|
||||
Sets grouping attribute, function, and group sorting mode, and enables
|
||||
grouping.
|
||||
</para>
|
||||
<para>
|
||||
Grouping feature is very similar to GROUP BY clause in SQL.
|
||||
Results produced by this function call are going to be the same as produced
|
||||
by the following pseudo code:
|
||||
<command>SELECT ... GROUP BY $func($attribute) ORDER BY $groupsort</command>.
|
||||
</para>
|
||||
</refsect1>
|
||||
|
||||
<refsect1 role="parameters">
|
||||
&reftitle.parameters;
|
||||
<para>
|
||||
<variablelist>
|
||||
<varlistentry>
|
||||
<term><parameter>attribute</parameter></term>
|
||||
<listitem>
|
||||
<para>
|
||||
A string containing group-by attribute name.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term><parameter>func</parameter></term>
|
||||
<listitem>
|
||||
<para>
|
||||
Constant, which sets a function applied to the attribute value in order
|
||||
to compute group-by key.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term><parameter>groupsort</parameter></term>
|
||||
<listitem>
|
||||
<para>
|
||||
An optional clause controlling how the groups are sorted.
|
||||
Defaults to "@group desc".
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
</variablelist>
|
||||
</para>
|
||||
</refsect1>
|
||||
|
||||
<refsect1 role="returnvalues">
|
||||
&reftitle.returnvalues;
|
||||
<para>
|
||||
&return.success;
|
||||
</para>
|
||||
</refsect1>
|
||||
|
||||
<refsect1 role="seealso">
|
||||
&reftitle.seealso;
|
||||
<para>
|
||||
<simplelist>
|
||||
<member><xref linkend="sphinxclient.resetgroupby" /></member>
|
||||
<member><xref linkend="sphinxclient.setsortmode" /></member>
|
||||
<member><xref linkend="sphinxclient.setgroupdistinct" /></member>
|
||||
</simplelist>
|
||||
</para>
|
||||
</refsect1>
|
||||
|
||||
</refentry>
|
||||
|
||||
<!-- Keep this comment at the end of the file
|
||||
Local variables:
|
||||
mode: sgml
|
||||
sgml-omittag:t
|
||||
sgml-shorttag:t
|
||||
sgml-minimize-attributes:nil
|
||||
sgml-always-quote-attributes:t
|
||||
sgml-indent-step:1
|
||||
sgml-indent-data:t
|
||||
indent-tabs-mode:nil
|
||||
sgml-parent-document:nil
|
||||
sgml-default-dtd-file:"../../../../manual.ced"
|
||||
sgml-exposed-tags:nil
|
||||
sgml-local-catalogs:nil
|
||||
sgml-local-ecat-files:nil
|
||||
End:
|
||||
vim600: syn=xml fen fdm=syntax fdl=2 si
|
||||
vim: et tw=78 syn=sgml
|
||||
vi: ts=1 sw=1
|
||||
-->
|
80
reference/sphinx/sphinxclient/setgroupdistinct.xml
Normal file
80
reference/sphinx/sphinxclient/setgroupdistinct.xml
Normal file
|
@ -0,0 +1,80 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!-- $Revision: 1.1 $ -->
|
||||
|
||||
<refentry xml:id="sphinxclient.setgroupdistinct" xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink">
|
||||
<refnamediv>
|
||||
<refname>SphinxClient::setGroupDistinct</refname>
|
||||
<refpurpose>Set attribute name for per-group distinct values count calculations</refpurpose>
|
||||
</refnamediv>
|
||||
|
||||
<refsect1 role="description">
|
||||
&reftitle.description;
|
||||
<methodsynopsis>
|
||||
<modifier>public</modifier> <type>bool</type><methodname>SphinxClient::setGroupDistinct</methodname>
|
||||
<methodparam><type>string</type><parameter>attribute</parameter></methodparam>
|
||||
</methodsynopsis>
|
||||
<para>
|
||||
Sets attribute name for per-group distinct values count calculations. Only
|
||||
available for grouping queries. For each group, all values of
|
||||
<parameter>attribute</parameter> will be stored, then the amount of
|
||||
distinct values will be calculated and returned to the client. This feature
|
||||
is similar to COUNT(DISTINCT) clause in SQL.
|
||||
</para>
|
||||
</refsect1>
|
||||
|
||||
<refsect1 role="parameters">
|
||||
&reftitle.parameters;
|
||||
<para>
|
||||
<variablelist>
|
||||
<varlistentry>
|
||||
<term><parameter>attribute</parameter></term>
|
||||
<listitem>
|
||||
<para>
|
||||
A string containing group-by attribute name.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
</variablelist>
|
||||
</para>
|
||||
</refsect1>
|
||||
|
||||
<refsect1 role="returnvalues">
|
||||
&reftitle.returnvalues;
|
||||
<para>
|
||||
&return.success;
|
||||
</para>
|
||||
</refsect1>
|
||||
|
||||
<refsect1 role="seealso">
|
||||
&reftitle.seealso;
|
||||
<para>
|
||||
<simplelist>
|
||||
<member><xref linkend="sphinxclient.setsortmode" /></member>
|
||||
<member><xref linkend="sphinxclient.setgroupby" /></member>
|
||||
<member><xref linkend="sphinxclient.resetgroupby" /></member>
|
||||
</simplelist>
|
||||
</para>
|
||||
</refsect1>
|
||||
|
||||
</refentry>
|
||||
|
||||
<!-- Keep this comment at the end of the file
|
||||
Local variables:
|
||||
mode: sgml
|
||||
sgml-omittag:t
|
||||
sgml-shorttag:t
|
||||
sgml-minimize-attributes:nil
|
||||
sgml-always-quote-attributes:t
|
||||
sgml-indent-step:1
|
||||
sgml-indent-data:t
|
||||
indent-tabs-mode:nil
|
||||
sgml-parent-document:nil
|
||||
sgml-default-dtd-file:"../../../../manual.ced"
|
||||
sgml-exposed-tags:nil
|
||||
sgml-local-catalogs:nil
|
||||
sgml-local-ecat-files:nil
|
||||
End:
|
||||
vim600: syn=xml fen fdm=syntax fdl=2 si
|
||||
vim: et tw=78 syn=sgml
|
||||
vi: ts=1 sw=1
|
||||
-->
|
78
reference/sphinx/sphinxclient/setidrange.xml
Normal file
78
reference/sphinx/sphinxclient/setidrange.xml
Normal file
|
@ -0,0 +1,78 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!-- $Revision: 1.1 $ -->
|
||||
|
||||
<refentry xml:id="sphinxclient.setidrange" xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink">
|
||||
<refnamediv>
|
||||
<refname>SphinxClient::setIDRange</refname>
|
||||
<refpurpose>Set a range of accepted document IDs</refpurpose>
|
||||
</refnamediv>
|
||||
|
||||
<refsect1 role="description">
|
||||
&reftitle.description;
|
||||
<methodsynopsis>
|
||||
<modifier>public</modifier> <type>bool</type><methodname>SphinxClient::setIDRange</methodname>
|
||||
<methodparam><type>int</type><parameter>min</parameter></methodparam>
|
||||
<methodparam><type>int</type><parameter>max</parameter></methodparam>
|
||||
</methodsynopsis>
|
||||
<para>
|
||||
Sets an accepted range of document IDs. Default range is from 0 to 0, i.e.
|
||||
no limit. Only those records that have document ID between
|
||||
<parameter>min</parameter> and <parameter>max</parameter>
|
||||
(including IDs exactly equal to <parameter>min</parameter> or
|
||||
<parameter>max</parameter>) will be matched.
|
||||
</para>
|
||||
</refsect1>
|
||||
|
||||
<refsect1 role="parameters">
|
||||
&reftitle.parameters;
|
||||
<para>
|
||||
<variablelist>
|
||||
<varlistentry>
|
||||
<term><parameter>min</parameter></term>
|
||||
<listitem>
|
||||
<para>
|
||||
Minimum ID value.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term><parameter>max</parameter></term>
|
||||
<listitem>
|
||||
<para>
|
||||
Maximum ID value.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
</variablelist>
|
||||
</para>
|
||||
</refsect1>
|
||||
|
||||
<refsect1 role="returnvalues">
|
||||
&reftitle.returnvalues;
|
||||
<para>
|
||||
&return.success;
|
||||
</para>
|
||||
</refsect1>
|
||||
|
||||
</refentry>
|
||||
|
||||
<!-- Keep this comment at the end of the file
|
||||
Local variables:
|
||||
mode: sgml
|
||||
sgml-omittag:t
|
||||
sgml-shorttag:t
|
||||
sgml-minimize-attributes:nil
|
||||
sgml-always-quote-attributes:t
|
||||
sgml-indent-step:1
|
||||
sgml-indent-data:t
|
||||
indent-tabs-mode:nil
|
||||
sgml-parent-document:nil
|
||||
sgml-default-dtd-file:"../../../../manual.ced"
|
||||
sgml-exposed-tags:nil
|
||||
sgml-local-catalogs:nil
|
||||
sgml-local-ecat-files:nil
|
||||
End:
|
||||
vim600: syn=xml fen fdm=syntax fdl=2 si
|
||||
vim: et tw=78 syn=sgml
|
||||
vi: ts=1 sw=1
|
||||
-->
|
68
reference/sphinx/sphinxclient/setindexweights.xml
Normal file
68
reference/sphinx/sphinxclient/setindexweights.xml
Normal file
|
@ -0,0 +1,68 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!-- $Revision: 1.1 $ -->
|
||||
|
||||
<refentry xml:id="sphinxclient.setindexweights" xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink">
|
||||
<refnamediv>
|
||||
<refname>SphinxClient::setIndexWeights</refname>
|
||||
<refpurpose>Set per-index weights</refpurpose>
|
||||
</refnamediv>
|
||||
|
||||
<refsect1 role="description">
|
||||
&reftitle.description;
|
||||
<methodsynopsis>
|
||||
<modifier>public</modifier> <type>bool</type><methodname>SphinxClient::setIndexWeights</methodname>
|
||||
<methodparam><type>array</type><parameter>weights</parameter></methodparam>
|
||||
</methodsynopsis>
|
||||
<para>
|
||||
Sets per-index weights and enables weighted summing of match weights across
|
||||
different indexes.
|
||||
</para>
|
||||
</refsect1>
|
||||
|
||||
<refsect1 role="parameters">
|
||||
&reftitle.parameters;
|
||||
<para>
|
||||
<variablelist>
|
||||
<varlistentry>
|
||||
<term><parameter>weights</parameter></term>
|
||||
<listitem>
|
||||
<para>
|
||||
An associative array mapping string index names to integer
|
||||
weights. Default is empty array, i.e. weighting summing is disabled.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
</variablelist>
|
||||
</para>
|
||||
|
||||
</refsect1>
|
||||
|
||||
<refsect1 role="returnvalues">
|
||||
&reftitle.returnvalues;
|
||||
<para>
|
||||
&return.success;
|
||||
</para>
|
||||
</refsect1>
|
||||
|
||||
</refentry>
|
||||
|
||||
<!-- Keep this comment at the end of the file
|
||||
Local variables:
|
||||
mode: sgml
|
||||
sgml-omittag:t
|
||||
sgml-shorttag:t
|
||||
sgml-minimize-attributes:nil
|
||||
sgml-always-quote-attributes:t
|
||||
sgml-indent-step:1
|
||||
sgml-indent-data:t
|
||||
indent-tabs-mode:nil
|
||||
sgml-parent-document:nil
|
||||
sgml-default-dtd-file:"../../../../manual.ced"
|
||||
sgml-exposed-tags:nil
|
||||
sgml-local-catalogs:nil
|
||||
sgml-local-ecat-files:nil
|
||||
End:
|
||||
vim600: syn=xml fen fdm=syntax fdl=2 si
|
||||
vim: et tw=78 syn=sgml
|
||||
vi: ts=1 sw=1
|
||||
-->
|
99
reference/sphinx/sphinxclient/setlimits.xml
Normal file
99
reference/sphinx/sphinxclient/setlimits.xml
Normal file
|
@ -0,0 +1,99 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!-- $Revision: 1.1 $ -->
|
||||
|
||||
<refentry xml:id="sphinxclient.setlimits" xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink">
|
||||
<refnamediv>
|
||||
<refname>SphinxClient::setLimits</refname>
|
||||
<refpurpose>Set offset and limit of the result set</refpurpose>
|
||||
</refnamediv>
|
||||
|
||||
<refsect1 role="description">
|
||||
&reftitle.description;
|
||||
<methodsynopsis>
|
||||
<modifier>public</modifier> <type>bool</type><methodname>SphinxClient::setLimits</methodname>
|
||||
<methodparam><type>int</type><parameter>offset</parameter></methodparam>
|
||||
<methodparam><type>int</type><parameter>limit</parameter></methodparam>
|
||||
<methodparam choice="opt"><type>int</type><parameter>max</parameter></methodparam>
|
||||
<methodparam choice="opt"><type>int</type><parameter>cutoff</parameter></methodparam>
|
||||
</methodsynopsis>
|
||||
<para>
|
||||
Sets <parameter>offset</parameter> into server-side result set and amount
|
||||
of matches to return to client starting from that offset
|
||||
(<parameter>limit</parameter>). Can additionally control maximum
|
||||
server-side result set size for current query
|
||||
(<parameter>max_matches</parameter>) and the threshold amount of matches
|
||||
to stop searching at (<parameter>cutoff</parameter>).
|
||||
</para>
|
||||
</refsect1>
|
||||
|
||||
<refsect1 role="parameters">
|
||||
&reftitle.parameters;
|
||||
<para>
|
||||
<variablelist>
|
||||
<varlistentry>
|
||||
<term><parameter>offset</parameter></term>
|
||||
<listitem>
|
||||
<para>
|
||||
Result set offset.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term><parameter>limit</parameter></term>
|
||||
<listitem>
|
||||
<para>
|
||||
Amount of matches to return.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term><parameter>max_matches</parameter></term>
|
||||
<listitem>
|
||||
<para>
|
||||
Controls how much matches searchd will keep in RAM while searching.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term><parameter>cutoff</parameter></term>
|
||||
<listitem>
|
||||
<para>
|
||||
Used for advanced performance control. It tells searchd to forcibly
|
||||
stop search query once <parameter>cutoff</parameter> matches have been
|
||||
found and processed.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
</variablelist>
|
||||
</para>
|
||||
</refsect1>
|
||||
|
||||
<refsect1 role="returnvalues">
|
||||
&reftitle.returnvalues;
|
||||
<para>
|
||||
&return.success;
|
||||
</para>
|
||||
</refsect1>
|
||||
|
||||
</refentry>
|
||||
|
||||
<!-- Keep this comment at the end of the file
|
||||
Local variables:
|
||||
mode: sgml
|
||||
sgml-omittag:t
|
||||
sgml-shorttag:t
|
||||
sgml-minimize-attributes:nil
|
||||
sgml-always-quote-attributes:t
|
||||
sgml-indent-step:1
|
||||
sgml-indent-data:t
|
||||
indent-tabs-mode:nil
|
||||
sgml-parent-document:nil
|
||||
sgml-default-dtd-file:"../../../../manual.ced"
|
||||
sgml-exposed-tags:nil
|
||||
sgml-local-catalogs:nil
|
||||
sgml-local-ecat-files:nil
|
||||
End:
|
||||
vim600: syn=xml fen fdm=syntax fdl=2 si
|
||||
vim: et tw=78 syn=sgml
|
||||
vi: ts=1 sw=1
|
||||
-->
|
118
reference/sphinx/sphinxclient/setmatchmode.xml
Normal file
118
reference/sphinx/sphinxclient/setmatchmode.xml
Normal file
|
@ -0,0 +1,118 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!-- $Revision: 1.1 $ -->
|
||||
|
||||
<refentry xml:id="sphinxclient.setmatchmode" xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink">
|
||||
<refnamediv>
|
||||
<refname>SphinxClient::setMatchMode</refname>
|
||||
<refpurpose>Set full-text query matching mode</refpurpose>
|
||||
</refnamediv>
|
||||
|
||||
<refsect1 role="description">
|
||||
&reftitle.description;
|
||||
<methodsynopsis>
|
||||
<modifier>public</modifier> <type>bool</type><methodname>SphinxClient::setMatchMode</methodname>
|
||||
<methodparam><type>int</type><parameter>mode</parameter></methodparam>
|
||||
</methodsynopsis>
|
||||
<para>
|
||||
Sets full-text query matching mode. <parameter>mode</parameter> is one of
|
||||
the constants listed below.
|
||||
<table>
|
||||
<title>Match modes</title>
|
||||
<tgroup cols="2">
|
||||
<thead>
|
||||
<row>
|
||||
<entry>Constant</entry>
|
||||
<entry>Description</entry>
|
||||
</row>
|
||||
</thead>
|
||||
<tbody>
|
||||
<row>
|
||||
<entry>SPH_MATCH_ALL</entry>
|
||||
<entry>Match all query words (default mode).</entry>
|
||||
</row>
|
||||
<row>
|
||||
<entry>SPH_MATCH_ANY</entry>
|
||||
<entry>Match any of query words.</entry>
|
||||
</row>
|
||||
<row>
|
||||
<entry>SPH_MATCH_PHRASE</entry>
|
||||
<entry>Match query as a phrase, requiring perfect match.</entry>
|
||||
</row>
|
||||
<row>
|
||||
<entry>SPH_MATCH_BOOLEAN</entry>
|
||||
<entry>Match query as a boolean expression.</entry>
|
||||
</row>
|
||||
<row>
|
||||
<entry>SPH_MATCH_EXTENDED</entry>
|
||||
<entry>Match query as an expression in Sphinx internal query language.</entry>
|
||||
</row>
|
||||
<row>
|
||||
<entry>SPH_MATCH_FULLSCAN</entry>
|
||||
<entry>Enables fullscan.</entry>
|
||||
</row>
|
||||
<row>
|
||||
<entry>SPH_MATCH_EXTENDED2</entry>
|
||||
<entry>The same as <constant>SPH_MATCH_EXTENDED</constant> plus ranking
|
||||
and quorum searching support.</entry>
|
||||
</row>
|
||||
</tbody>
|
||||
</tgroup>
|
||||
</table>
|
||||
</para>
|
||||
</refsect1>
|
||||
|
||||
<refsect1 role="parameters">
|
||||
&reftitle.parameters;
|
||||
<para>
|
||||
<variablelist>
|
||||
<varlistentry>
|
||||
<term><parameter>mode</parameter></term>
|
||||
<listitem>
|
||||
<para>
|
||||
Matching mode.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
</variablelist>
|
||||
</para>
|
||||
</refsect1>
|
||||
|
||||
<refsect1 role="returnvalues">
|
||||
&reftitle.returnvalues;
|
||||
<para>
|
||||
&return.success;
|
||||
</para>
|
||||
</refsect1>
|
||||
|
||||
<refsect1 role="seealso">
|
||||
&reftitle.seealso;
|
||||
<para>
|
||||
<simplelist>
|
||||
<member><xref linkend="sphinxclient.setrankingmode" /></member>
|
||||
<member><xref linkend="sphinxclient.setsortmode" /></member>
|
||||
</simplelist>
|
||||
</para>
|
||||
</refsect1>
|
||||
|
||||
</refentry>
|
||||
|
||||
<!-- Keep this comment at the end of the file
|
||||
Local variables:
|
||||
mode: sgml
|
||||
sgml-omittag:t
|
||||
sgml-shorttag:t
|
||||
sgml-minimize-attributes:nil
|
||||
sgml-always-quote-attributes:t
|
||||
sgml-indent-step:1
|
||||
sgml-indent-data:t
|
||||
indent-tabs-mode:nil
|
||||
sgml-parent-document:nil
|
||||
sgml-default-dtd-file:"../../../../manual.ced"
|
||||
sgml-exposed-tags:nil
|
||||
sgml-local-catalogs:nil
|
||||
sgml-local-ecat-files:nil
|
||||
End:
|
||||
vim600: syn=xml fen fdm=syntax fdl=2 si
|
||||
vim: et tw=78 syn=sgml
|
||||
vi: ts=1 sw=1
|
||||
-->
|
75
reference/sphinx/sphinxclient/setmaxquerytime.xml
Normal file
75
reference/sphinx/sphinxclient/setmaxquerytime.xml
Normal file
|
@ -0,0 +1,75 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!-- $Revision: 1.1 $ -->
|
||||
|
||||
<refentry xml:id="sphinxclient.setmaxquerytime" xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink">
|
||||
<refnamediv>
|
||||
<refname>SphinxClient::setMaxQueryTime</refname>
|
||||
<refpurpose>Set maximum query time</refpurpose>
|
||||
</refnamediv>
|
||||
|
||||
<refsect1 role="description">
|
||||
&reftitle.description;
|
||||
<methodsynopsis>
|
||||
<modifier>public</modifier> <type>bool</type><methodname>SphinxClient::setMaxQueryTime</methodname>
|
||||
<methodparam><type>string</type><parameter>qtime</parameter></methodparam>
|
||||
</methodsynopsis>
|
||||
<para>
|
||||
Sets maximum search query time, in milliseconds. <parameter>qtime</parameter> must be a
|
||||
non-negative integer. Default value is 0, i.e. no limit.
|
||||
</para>
|
||||
</refsect1>
|
||||
|
||||
<refsect1 role="parameters">
|
||||
&reftitle.parameters;
|
||||
<para>
|
||||
<variablelist>
|
||||
<varlistentry>
|
||||
<term><parameter>qtime</parameter></term>
|
||||
<listitem>
|
||||
<para>
|
||||
Maximum query time, in milliseconds.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
</variablelist>
|
||||
</para>
|
||||
</refsect1>
|
||||
|
||||
<refsect1 role="returnvalues">
|
||||
&reftitle.returnvalues;
|
||||
<para>
|
||||
&return.success;
|
||||
</para>
|
||||
</refsect1>
|
||||
|
||||
<refsect1 role="seealso">
|
||||
&reftitle.seealso;
|
||||
<para>
|
||||
<simplelist>
|
||||
<member><xref linkend="sphinxclient.setmaxquerytime" /></member>
|
||||
</simplelist>
|
||||
</para>
|
||||
</refsect1>
|
||||
|
||||
</refentry>
|
||||
|
||||
<!-- Keep this comment at the end of the file
|
||||
Local variables:
|
||||
mode: sgml
|
||||
sgml-omittag:t
|
||||
sgml-shorttag:t
|
||||
sgml-minimize-attributes:nil
|
||||
sgml-always-quote-attributes:t
|
||||
sgml-indent-step:1
|
||||
sgml-indent-data:t
|
||||
indent-tabs-mode:nil
|
||||
sgml-parent-document:nil
|
||||
sgml-default-dtd-file:"../../../../manual.ced"
|
||||
sgml-exposed-tags:nil
|
||||
sgml-local-catalogs:nil
|
||||
sgml-local-ecat-files:nil
|
||||
End:
|
||||
vim600: syn=xml fen fdm=syntax fdl=2 si
|
||||
vim: et tw=78 syn=sgml
|
||||
vi: ts=1 sw=1
|
||||
-->
|
105
reference/sphinx/sphinxclient/setrankingmode.xml
Normal file
105
reference/sphinx/sphinxclient/setrankingmode.xml
Normal file
|
@ -0,0 +1,105 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!-- $Revision: 1.1 $ -->
|
||||
|
||||
<refentry xml:id="sphinxclient.setrankingmode" xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink">
|
||||
<refnamediv>
|
||||
<refname>SphinxClient::setRankingMode</refname>
|
||||
<refpurpose>Set ranking mode</refpurpose>
|
||||
</refnamediv>
|
||||
|
||||
<refsect1 role="description">
|
||||
&reftitle.description;
|
||||
<methodsynopsis>
|
||||
<modifier>public</modifier> <type>bool</type><methodname>SphinxClient::setRankingMode</methodname>
|
||||
<methodparam><type>int</type><parameter>ranker</parameter></methodparam>
|
||||
</methodsynopsis>
|
||||
<para>
|
||||
Sets ranking mode. Only available in
|
||||
<constant>SPH_MATCH_EXTENDED2</constant> matching mode.
|
||||
<table>
|
||||
<title>Ranking modes</title>
|
||||
<tgroup cols="2">
|
||||
<thead>
|
||||
<row>
|
||||
<entry>Constant</entry>
|
||||
<entry>Description</entry>
|
||||
</row>
|
||||
</thead>
|
||||
<tbody>
|
||||
<row>
|
||||
<entry>SPH_RANK_PROXIMITY_BM25</entry>
|
||||
<entry>Default ranking mode which uses both proximity and BM25
|
||||
ranking.</entry>
|
||||
</row>
|
||||
<row>
|
||||
<entry>SPH_RANK_BM25</entry>
|
||||
<entry>Statistical ranking mode which uses BM25 ranking only (similar
|
||||
to most of other full-text engines). This mode is faster, but may result
|
||||
in worse quality on queries which contain more than 1 keyword.</entry>
|
||||
</row>
|
||||
<row>
|
||||
<entry>SPH_RANK_NONE</entry>
|
||||
<entry>Disables ranking. This mode is the fastest. It is essentially
|
||||
equivalent to boolean searching, a weight of 1 is assigned to all
|
||||
matches.</entry>
|
||||
</row>
|
||||
</tbody>
|
||||
</tgroup>
|
||||
</table>
|
||||
</para>
|
||||
</refsect1>
|
||||
|
||||
<refsect1 role="parameters">
|
||||
&reftitle.parameters;
|
||||
<para>
|
||||
<variablelist>
|
||||
<varlistentry>
|
||||
<term><parameter>ranker</parameter></term>
|
||||
<listitem>
|
||||
<para>
|
||||
Ranking mode.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
</variablelist>
|
||||
</para>
|
||||
</refsect1>
|
||||
|
||||
<refsect1 role="returnvalues">
|
||||
&reftitle.returnvalues;
|
||||
<para>
|
||||
&return.success;
|
||||
</para>
|
||||
</refsect1>
|
||||
|
||||
<refsect1 role="seealso">
|
||||
&reftitle.seealso;
|
||||
<para>
|
||||
<simplelist>
|
||||
<member><xref linkend="sphinxclient.setmatchmode" /></member>
|
||||
</simplelist>
|
||||
</para>
|
||||
</refsect1>
|
||||
|
||||
</refentry>
|
||||
|
||||
<!-- Keep this comment at the end of the file
|
||||
Local variables:
|
||||
mode: sgml
|
||||
sgml-omittag:t
|
||||
sgml-shorttag:t
|
||||
sgml-minimize-attributes:nil
|
||||
sgml-always-quote-attributes:t
|
||||
sgml-indent-step:1
|
||||
sgml-indent-data:t
|
||||
indent-tabs-mode:nil
|
||||
sgml-parent-document:nil
|
||||
sgml-default-dtd-file:"../../../../manual.ced"
|
||||
sgml-exposed-tags:nil
|
||||
sgml-local-catalogs:nil
|
||||
sgml-local-ecat-files:nil
|
||||
End:
|
||||
vim600: syn=xml fen fdm=syntax fdl=2 si
|
||||
vim: et tw=78 syn=sgml
|
||||
vi: ts=1 sw=1
|
||||
-->
|
84
reference/sphinx/sphinxclient/setretries.xml
Normal file
84
reference/sphinx/sphinxclient/setretries.xml
Normal file
|
@ -0,0 +1,84 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!-- $Revision: 1.1 $ -->
|
||||
|
||||
<refentry xml:id="sphinxclient.setretries" xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink">
|
||||
<refnamediv>
|
||||
<refname>SphinxClient::setRetries</refname>
|
||||
<refpurpose>Set retry count and delay</refpurpose>
|
||||
</refnamediv>
|
||||
|
||||
<refsect1 role="description">
|
||||
&reftitle.description;
|
||||
<methodsynopsis>
|
||||
<modifier>public</modifier> <type>bool</type><methodname>SphinxClient::setRetries</methodname>
|
||||
<methodparam><type>int</type><parameter>count</parameter></methodparam>
|
||||
<methodparam choice="opt"><type>int</type><parameter>delay</parameter></methodparam>
|
||||
</methodsynopsis>
|
||||
<para>
|
||||
Sets distributed retry count and delay.
|
||||
</para>
|
||||
<para>
|
||||
On temporary failures searchd will attempt up to
|
||||
<parameter>count</parameter> retries per agent.
|
||||
<parameter>delay</parameter> is the delay between the retries,
|
||||
in milliseconds. Retries are disabled by default.
|
||||
Note that this call will not make the API itself retry
|
||||
on temporary failure; it only tells searchd to do so.
|
||||
</para>
|
||||
</refsect1>
|
||||
|
||||
<refsect1 role="parameters">
|
||||
&reftitle.parameters;
|
||||
<para>
|
||||
<variablelist>
|
||||
<varlistentry>
|
||||
<term><parameter>count</parameter></term>
|
||||
<listitem>
|
||||
<para>
|
||||
Number of retries.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
</variablelist>
|
||||
<variablelist>
|
||||
<varlistentry>
|
||||
<term><parameter>delay</parameter></term>
|
||||
<listitem>
|
||||
<para>
|
||||
Delay between retries, in milliseconds.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
</variablelist>
|
||||
</para>
|
||||
</refsect1>
|
||||
|
||||
<refsect1 role="returnvalues">
|
||||
&reftitle.returnvalues;
|
||||
<para>
|
||||
&return.success;
|
||||
</para>
|
||||
</refsect1>
|
||||
|
||||
</refentry>
|
||||
|
||||
<!-- Keep this comment at the end of the file
|
||||
Local variables:
|
||||
mode: sgml
|
||||
sgml-omittag:t
|
||||
sgml-shorttag:t
|
||||
sgml-minimize-attributes:nil
|
||||
sgml-always-quote-attributes:t
|
||||
sgml-indent-step:1
|
||||
sgml-indent-data:t
|
||||
indent-tabs-mode:nil
|
||||
sgml-parent-document:nil
|
||||
sgml-default-dtd-file:"../../../../manual.ced"
|
||||
sgml-exposed-tags:nil
|
||||
sgml-local-catalogs:nil
|
||||
sgml-local-ecat-files:nil
|
||||
End:
|
||||
vim600: syn=xml fen fdm=syntax fdl=2 si
|
||||
vim: et tw=78 syn=sgml
|
||||
vi: ts=1 sw=1
|
||||
-->
|
76
reference/sphinx/sphinxclient/setserver.xml
Normal file
76
reference/sphinx/sphinxclient/setserver.xml
Normal file
|
@ -0,0 +1,76 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!-- $Revision: 1.1 $ -->
|
||||
|
||||
<refentry xml:id="sphinxclient.setserver" xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink">
|
||||
<refnamediv>
|
||||
<refname>SphinxClient::setServer</refname>
|
||||
<refpurpose>Set searchd host and port</refpurpose>
|
||||
</refnamediv>
|
||||
|
||||
<refsect1 role="description">
|
||||
&reftitle.description;
|
||||
<methodsynopsis>
|
||||
<modifier>public</modifier> <type>bool</type><methodname>SphinxClient::setServer</methodname>
|
||||
<methodparam><type>string</type><parameter>server</parameter></methodparam>
|
||||
<methodparam><type>int</type><parameter>port</parameter></methodparam>
|
||||
</methodsynopsis>
|
||||
<para>
|
||||
Sets searchd host name and TCP port. All subsequent requests will use the
|
||||
new host and port settings. Default host and port are 'localhost' and 3312,
|
||||
respectively.
|
||||
</para>
|
||||
</refsect1>
|
||||
|
||||
<refsect1 role="parameters">
|
||||
&reftitle.parameters;
|
||||
<para>
|
||||
<variablelist>
|
||||
<varlistentry>
|
||||
<term><parameter>server</parameter></term>
|
||||
<listitem>
|
||||
<para>
|
||||
IP or hostname.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term><parameter>port</parameter></term>
|
||||
<listitem>
|
||||
<para>
|
||||
Port number.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
</variablelist>
|
||||
</para>
|
||||
</refsect1>
|
||||
|
||||
<refsect1 role="returnvalues">
|
||||
&reftitle.returnvalues;
|
||||
<para>
|
||||
&return.success;
|
||||
</para>
|
||||
</refsect1>
|
||||
|
||||
</refentry>
|
||||
|
||||
<!-- Keep this comment at the end of the file
|
||||
Local variables:
|
||||
mode: sgml
|
||||
sgml-omittag:t
|
||||
sgml-shorttag:t
|
||||
sgml-minimize-attributes:nil
|
||||
sgml-always-quote-attributes:t
|
||||
sgml-indent-step:1
|
||||
sgml-indent-data:t
|
||||
indent-tabs-mode:nil
|
||||
sgml-parent-document:nil
|
||||
sgml-default-dtd-file:"../../../../manual.ced"
|
||||
sgml-exposed-tags:nil
|
||||
sgml-local-catalogs:nil
|
||||
sgml-local-ecat-files:nil
|
||||
End:
|
||||
vim600: syn=xml fen fdm=syntax fdl=2 si
|
||||
vim: et tw=78 syn=sgml
|
||||
vi: ts=1 sw=1
|
||||
-->
|
123
reference/sphinx/sphinxclient/setsortmode.xml
Normal file
123
reference/sphinx/sphinxclient/setsortmode.xml
Normal file
|
@ -0,0 +1,123 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!-- $Revision: 1.1 $ -->
|
||||
|
||||
<refentry xml:id="sphinxclient.setsortmode" xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink">
|
||||
<refnamediv>
|
||||
<refname>SphinxClient::setSortMode</refname>
|
||||
<refpurpose>Set matches sorting mode</refpurpose>
|
||||
</refnamediv>
|
||||
|
||||
<refsect1 role="description">
|
||||
&reftitle.description;
|
||||
<methodsynopsis>
|
||||
<modifier>public</modifier> <type>bool</type><methodname>SphinxClient::setSortMode</methodname>
|
||||
<methodparam><type>int</type><parameter>mode</parameter></methodparam>
|
||||
<methodparam choice="opt"><type>string</type><parameter>sortby</parameter></methodparam>
|
||||
</methodsynopsis>
|
||||
<para>
|
||||
Sets matches sorting mode. See available modes below.
|
||||
<table>
|
||||
<title>Sorting modes</title>
|
||||
<tgroup cols="2">
|
||||
<thead>
|
||||
<row>
|
||||
<entry>Constant</entry>
|
||||
<entry>Description</entry>
|
||||
</row>
|
||||
</thead>
|
||||
<tbody>
|
||||
<row>
|
||||
<entry>SPH_SORT_RELEVANCE</entry>
|
||||
<entry>Sort by relevance in descending order (best matches first).</entry>
|
||||
</row>
|
||||
<row>
|
||||
<entry>SPH_SORT_ATTR_DESC</entry>
|
||||
<entry>Sort by an attribute in descending order (bigger attribute
|
||||
values first).</entry>
|
||||
</row>
|
||||
<row>
|
||||
<entry>SPH_SORT_ATTR_ASC</entry>
|
||||
<entry>Sort by an attribute in ascending order (smaller attribute
|
||||
values first).</entry>
|
||||
</row>
|
||||
<row>
|
||||
<entry>SPH_SORT_TIME_SEGMENTS</entry>
|
||||
<entry>Sort by time segments (last hour/day/week/month) in descending
|
||||
order, and then by relevance in descending order.</entry>
|
||||
</row>
|
||||
<row>
|
||||
<entry>SPH_SORT_EXTENDED</entry>
|
||||
<entry>Sort by SQL-like combination of columns in ASC/DESC order.</entry>
|
||||
</row>
|
||||
<row>
|
||||
<entry>SPH_SORT_EXPR</entry>
|
||||
<entry>Sort by an arithmetic expression.</entry>
|
||||
</row>
|
||||
</tbody>
|
||||
</tgroup>
|
||||
</table>
|
||||
</para>
|
||||
</refsect1>
|
||||
|
||||
<refsect1 role="parameters">
|
||||
&reftitle.parameters;
|
||||
<para>
|
||||
<variablelist>
|
||||
<varlistentry>
|
||||
<term><parameter>mode</parameter></term>
|
||||
<listitem>
|
||||
<para>
|
||||
Sorting mode.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term><parameter>sortby</parameter></term>
|
||||
<listitem>
|
||||
<para>
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
</variablelist>
|
||||
</para>
|
||||
</refsect1>
|
||||
|
||||
<refsect1 role="returnvalues">
|
||||
&reftitle.returnvalues;
|
||||
<para>
|
||||
&return.success;
|
||||
</para>
|
||||
</refsect1>
|
||||
|
||||
<refsect1 role="seealso">
|
||||
&reftitle.seealso;
|
||||
<para>
|
||||
<simplelist>
|
||||
<member><xref linkend="sphinxclient.setmatchmode" /></member>
|
||||
<member><xref linkend="sphinxclient.setsortmode" /></member>
|
||||
</simplelist>
|
||||
</para>
|
||||
</refsect1>
|
||||
|
||||
</refentry>
|
||||
|
||||
<!-- Keep this comment at the end of the file
|
||||
Local variables:
|
||||
mode: sgml
|
||||
sgml-omittag:t
|
||||
sgml-shorttag:t
|
||||
sgml-minimize-attributes:nil
|
||||
sgml-always-quote-attributes:t
|
||||
sgml-indent-step:1
|
||||
sgml-indent-data:t
|
||||
indent-tabs-mode:nil
|
||||
sgml-parent-document:nil
|
||||
sgml-default-dtd-file:"../../../../manual.ced"
|
||||
sgml-exposed-tags:nil
|
||||
sgml-local-catalogs:nil
|
||||
sgml-local-ecat-files:nil
|
||||
End:
|
||||
vim600: syn=xml fen fdm=syntax fdl=2 si
|
||||
vim: et tw=78 syn=sgml
|
||||
vi: ts=1 sw=1
|
||||
-->
|
85
reference/sphinx/sphinxclient/updateattributes.xml
Normal file
85
reference/sphinx/sphinxclient/updateattributes.xml
Normal file
|
@ -0,0 +1,85 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!-- $Revision: 1.1 $ -->
|
||||
|
||||
<refentry xml:id="sphinxclient.updateattributes" xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink">
|
||||
<refnamediv>
|
||||
<refname>SphinxClient::updateAttributes</refname>
|
||||
<refpurpose>Updates document attributes</refpurpose>
|
||||
</refnamediv>
|
||||
|
||||
<refsect1 role="description">
|
||||
&reftitle.description;
|
||||
<methodsynopsis>
|
||||
<modifier>public</modifier> <type>int</type><methodname>SphinxClient::updateAttributes</methodname>
|
||||
<methodparam><type>string</type><parameter>index</parameter></methodparam>
|
||||
<methodparam><type>array</type><parameter>attributes</parameter></methodparam>
|
||||
<methodparam><type>array</type><parameter>values</parameter></methodparam>
|
||||
</methodsynopsis>
|
||||
<para>
|
||||
Instantly updates given attribute values in given documents.
|
||||
</para>
|
||||
</refsect1>
|
||||
|
||||
<refsect1 role="parameters">
|
||||
&reftitle.parameters;
|
||||
<para>
|
||||
<variablelist>
|
||||
<varlistentry>
|
||||
<term><parameter>index</parameter></term>
|
||||
<listitem>
|
||||
<para>
|
||||
Name of the index (or indexes) to be updated.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term><parameter>attributes</parameter></term>
|
||||
<listitem>
|
||||
<para>
|
||||
Array of attribute names, listing attributes that are updated.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term><parameter>values</parameter></term>
|
||||
<listitem>
|
||||
<para>
|
||||
Associative array containing document IDs as keys and array of
|
||||
attribute values as values.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
</variablelist>
|
||||
</para>
|
||||
</refsect1>
|
||||
|
||||
<refsect1 role="returnvalues">
|
||||
&reftitle.returnvalues;
|
||||
<para>
|
||||
Returns number of actually updated documents (0 or more) on success, or
|
||||
&false; on failure.
|
||||
</para>
|
||||
</refsect1>
|
||||
|
||||
</refentry>
|
||||
|
||||
<!-- Keep this comment at the end of the file
|
||||
Local variables:
|
||||
mode: sgml
|
||||
sgml-omittag:t
|
||||
sgml-shorttag:t
|
||||
sgml-minimize-attributes:nil
|
||||
sgml-always-quote-attributes:t
|
||||
sgml-indent-step:1
|
||||
sgml-indent-data:t
|
||||
indent-tabs-mode:nil
|
||||
sgml-parent-document:nil
|
||||
sgml-default-dtd-file:"../../../../manual.ced"
|
||||
sgml-exposed-tags:nil
|
||||
sgml-local-catalogs:nil
|
||||
sgml-local-ecat-files:nil
|
||||
End:
|
||||
vim600: syn=xml fen fdm=syntax fdl=2 si
|
||||
vim: et tw=78 syn=sgml
|
||||
vi: ts=1 sw=1
|
||||
-->
|
Loading…
Reference in a new issue