H
H
hysdop2015-01-27 18:54:41
symfony
hysdop, 2015-01-27 18:54:41

How to find out in which field a match was found in SphinxsearchBundle?

The code is something like this:

$searchd = $this->get('iakumai.sphinxsearch.search');
$query_word = $r->get('search');
$matches =  $searchd->searchEx($query_word, array('hotelsIndex'));

Essence. You need to find out in which field there is a match (dozens of them), cut out a piece of text from there and highlight it. The documentation for the bundle is poor. Here's everything I found.
<div class="text-block">
    {{ content|sphinx_highlight('IndexName', 'query word', {limit:100}) }}
</div>

Can someone come across?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
D
dllweb, 2015-01-27
@dllweb

Someone faced

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question