Your use-case is pretty unique. One solutions might be to use MemoryIndex which is designed for "Prospective search".
http://lucene.apache.org/java/2_4_0/api/contrib-memory/org/apache/lucene/index/memory/MemoryIndex.html Your documents will be your stored "huge numbers of queries". Your user entered search term (a b y z) will be tested against those stored queries. In your example, Your document will be a b y z and your stored queries will be q1 = a b q2 = b c q3 = x y z If you use AND operator, only q1/doc1 will be a hit. --- On Wed, 10/5/11, alexw <aw...@crossview.com> wrote: > From: alexw <aw...@crossview.com> > Subject: Re: A simple query? > To: solr-user@lucene.apache.org > Date: Wednesday, October 5, 2011, 3:15 PM > Thanks but, unfortunately that will > not solve the problem since it will bring > back both the first and second doc. Besides, the query > terms is: a b y z, > not just: a b > > -- > View this message in context: > http://lucene.472066.n3.nabble.com/A-simple-query-tp3395465p3396297.html > Sent from the Solr - User mailing list archive at > Nabble.com. >