You are viewing a plain text version of this content. The canonical link for it is here.
Posted to solr-user@lucene.apache.org by C0re <bl...@hotmail.co.uk> on 2010/10/14 12:30:39 UTC
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.
Re: Handling incomplete/malformed queries
Posted by Otis Gospodnetic <ot...@yahoo.com>.
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 <bl...@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.
>
Re: Handling incomplete/malformed queries
Posted by Otis Gospodnetic <ot...@yahoo.com>.
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 <bl...@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.
>