On 7/9/2015 11:25 AM, Andy Rahn wrote:
> I want to build an application that can search for specific documents based
> on a lot of criteria from a user (e.g. matching keywords, text, etc...).
> And then to combine these results using boolean logic ... For example,
> keyword 'animal' AND rating > 3
>
> Each document has an integer id.
>
> My strategy so far is to gather the id for each subquery into a temporary
> table.  Then I can combine the tables using UNION or INTERSECT keywords.

Why UNION or INTERSECT? Why not simply

select id from documents where keyword='animal' and rating  > 3;

?
-- 
Igor Tandetnik

Reply via email to