Suppose I have a table with millions strings in it as keys. What data structure can I use in order to efficiently support only queries like that?
select * from table where key contains (('cat' and 'dog') or 'apple')
example of strings that should be selected:
cat loves dog cat and dog apple trees
The collection is static.