I'm hoping Pat and/or the community can help with a complex query we'd
like to do with ThinkingSphinx/Sphinx. To express what we are looking
for we did the query through SQL.
-- Need a Thinking/sphinx search where I can express an 'or' condition
with different values of the same attribute.
-- The question marks ('?') are values passed into the query.
select distinct videos.id
from videos
join video_catalogs on videos.video_catalog_id = video_catalog.id
where videos.title like "%search term%"
and video_catalogs.id not in [?, ?, ...]
and ( (video_catalogs.visibility = 0)
or (video_catalogs.visibility = 1 and
video_catalogs.company_id = ?)
or (video_catalogs.visibility = 2 and
video_catalogs.company_id in [?, ?, ...]))
-- visibility is an enumerated integer.
-- video_catalogs.company_id is a single unsigned integer.
Is this possible with Thinking/Sphinx? Thanks for everyones time.
Sid
--
You received this message because you are subscribed to the Google Groups
"Thinking Sphinx" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/thinking-sphinx?hl=en.