2

Using Sphinx's SNIPPET() function, how can I remove any before_match and after_match from my query? I don't want anything wrapped around the matching text.

SNIPPET(field, 'word', 'after_match=""', 'before_match=""')

I've tried after_match="" but this adds literal quotes to the match.

I've tried after_match=''" but this fails

I've tried after_match= and this fails too

Any suggestions?

d-_-b
  • 21,536
  • 40
  • 150
  • 256

1 Answers1

3

My only suggestion is just to set it to some innocuous string, and then remove in post. 'after_match=*' then can do <?php $str = str_replace('*','',$str); sort of thing.

Or just use strip_tags style function to remove the automatic

<b>...</b> 

:)

barryhunter
  • 20,886
  • 3
  • 30
  • 43