0

Is there any way to perform the following query in sphinx index.

SELECT * FROM search_index WHERE MATCH('sea*') AND object_type IN ('news', 'videos') LIMIT 0, 7

This query doesnt work and throw the following error

sphinxql: syntax error, unexpected QUOTED_STRING, expecting CONST_INT or '-' near ''news', 'videos') LIMIT 0, 7 '

Marty Aghajanyan
  • 12,651
  • 8
  • 35
  • 37

1 Answers1

1

I think very latest version of sphinx (released a few days ago) supports that, but not totally sure.


But you could also just use fields rather than attributes, then can do it in the full-text query

SELECT * FROM search_index WHERE MATCH('sea* @object_type (news|videos)') LIMIT 0, 7
barryhunter
  • 20,886
  • 3
  • 30
  • 43