Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
有没有办法在狮身人面像索引中执行以下查询。
SELECT * FROM search_index WHERE MATCH('sea*') AND object_type IN ('news', 'videos') LIMIT 0, 7
此查询不起作用并引发以下错误
sphinxql: 语法错误,意外的 QUOTED_STRING,在 ''news'、'videos' 附近需要 CONST_INT 或 '-') LIMIT 0, 7'
我认为最新版本的 sphinx(几天前发布)支持这一点,但并不完全确定。
但是您也可以只使用fields 而不是attributes,然后可以在全文查询中使用
field
attribute
SELECT * FROM search_index WHERE MATCH('sea* @object_type (news|videos)') LIMIT 0, 7