H
H
ha2bj2010-10-05 14:09:45
SQL
ha2bj, 2010-10-05 14:09:45

Sphinx: search by sql_attr_multi only?

And how to search only by filter? those. something like this:

$sphinx->SetFilter('tag', array(1,2,3));
$sphinx->Query('*', '*');

Answer the question

In order to leave comments, you need to log in

2 answer(s)
E
Eugene, 2010-10-05
@ha2bj

$sphinx = new SphinxClient();
$sphinx->SetServer('127.0.0.1', 9312);
$sphinx->SetMatchMode(SPH_MATCH_FULLSCAN);
$sphinx->SetFilter('tag', array(1,2,3));
$result = $sphinx->Query('', '*');

F
flypigs, 2010-10-05
@flypigs

sphinxsearch.com/docs/current.html#matching-modes
As I understand it, either you directly specify the full-scan mode, then, in theory, the request is ignored (I don’t remember already).
or you give an empty query — $sphinx->Query('', '*');
this is if you have docinfo in extern mode.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question