Hi, Hm, yeah, there is a library - the query parser classes in Lucene/Solr themselves. As far as I know, you have to try parsing and if there is no exception, the query is valid.
Otis---- Sematext :: http://sematext.com/ :: Solr - Lucene - Nutch Lucene ecosystem search :: http://search-lucene.com/ ----- Original Message ---- > From: C0re <blue-...@hotmail.co.uk> > To: solr-user@lucene.apache.org > Sent: Thu, October 14, 2010 6:30:39 AM > Subject: Handling incomplete/malformed queries > > > Queries such as: > > Cat AND > > (i.e the query is malformed with no second term provided) > > Causes a ParseException. > > Of course I could parse the query for sanity before it is submitted to Solr > but I wondered if there is a good practice way of checking/dealing with > queries which are incomplete? Perhaps a library already exists to help with > this? > > Thanks. > -- > View this message in context: >http://lucene.472066.n3.nabble.com/Handling-incomplete-malformed-queries-tp1700043p1700043.html > > Sent from the Solr - User mailing list archive at Nabble.com. >