Sweeeeet, thanks, Dean -----Original Message----- From: Raf [mailto:r.ventag...@gmail.com] Sent: Monday, June 20, 2011 11:34 AM To: java-user@lucene.apache.org Subject: Re: any documentation on creating a query without query language
You can always "create" your query by hand, using the various Query objects. For example: BooleanQuery bq = new BooleanQuery(); bq.add(new TermQuery(new Term("account", myAccount)), Occur.MUST); bq.add(new TermQuery(new Term("strategy", myStrategy)), Occur.MUST); bq.add(new TermQuery(new Term("account", myAccount)), Occur.MUST); bq.add(new TermRangeQuery("date", minDate, maxDate, false, false), Occur.MUST); and so on. Bye *Raf* On Mon, Jun 20, 2011 at 5:54 PM, Hiller, Dean x66079 < dean.hil...@broadridge.com> wrote: > I would like to skip creating the query using the query language. Our > queries are simple and fixed > Like account = :account and strategy=:strategy and date > :date > > So I would prefer maybe not to use a parser in the future sometime and am > really just wondering how. > > For now, I am just going to use the parser to get my stuff done but was > just curious on how to form it manually if I wanted to. > Thanks, > Dean > > This message and any attachments are intended only for the use of the > addressee and > may contain information that is privileged and confidential. If the reader > of the > message is not the intended recipient or an authorized representative of > the > intended recipient, you are hereby notified that any dissemination of this > communication is strictly prohibited. If you have received this > communication in > error, please notify us immediately by e-mail and delete the message and > any > attachments from your system. > > This message and any attachments are intended only for the use of the addressee and may contain information that is privileged and confidential. If the reader of the message is not the intended recipient or an authorized representative of the intended recipient, you are hereby notified that any dissemination of this communication is strictly prohibited. If you have received this communication in error, please notify us immediately by e-mail and delete the message and any attachments from your system. --------------------------------------------------------------------- To unsubscribe, e-mail: java-user-unsubscr...@lucene.apache.org For additional commands, e-mail: java-user-h...@lucene.apache.org