SphinxQL FACET is Awesome

FACET clause. This Sphinx specific extension enables faceted search with subtree optimization. It is capable of returning multiple result sets with a single SQL statement, without the need for complicated multi-queries. FACET clauses should be written at the very end of SELECT statements with spaces between them.

FACET {expr_list} [BY {expr_list}] [ORDER BY {expr | FACET()} {ASC | DESC}] [LIMIT [offset,] count]
SELECT * FROM test FACET brand_id FACET categories;
SELECT * FROM test FACET brand_name BY brand_id ORDER BY brand_name ASC FACET property;

The FACET Feature

SphinxQL FACET is Awesome by @sskaje: https://sskaje.me/2015/06/sphinxql-facet-awesome/

Patches for SphinxSearch Supporting 64-bit Range Step & 64-bit Search Filter

sphinxsearch. Patches available for 2.0.3-release, 2.0.4-release.

当configure指定参数 –enable-id64 时

1 增加 sql_range_step 字段的64位支持
2 调整 bin/search 的filter值为64位

Patches:
for SphinxSearch 2.0.3
for SphinxSearch 2.0.4

示例:
tar xvf sphinx-2.0.3-release.tar.gz

cd sphinx-2.0.3-release

patch -p1 < ../sphinx-2.0.3-release.64.patch ./configure --enable-id64 --prefix=/opt/sphinx203 --with-mysql make -j4 install cd /opt/sphinx203 ./bin/search -c etc/sphinx.ticket.conf -i your_index_name -q -f bigint_field 1110010011010313572

Patches for SphinxSearch Supporting 64-bit Range Step & 64-bit Search Filter by @sskaje: https://sskaje.me/2012/03/patch-for-sphinxsearch-64-bit/