lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From karl wettin <karl.wet...@gmail.com>
Subject Re: Empty search
Date Fri, 09 Feb 2007 10:45:57 GMT

9 feb 2007 kl. 11.34 skrev Kainth, Sachin:

> Yep it is the queryparser that I'm referring to.  Just sounds odd  
> to me.
> An empty string search should be handled properly I think.  It should
> simply  to nothing.

I did not look any closer at this than reading you post, but what  
about if you made sure that no empty strings is passed to the  
QueryParser?

I'd expect an exception if I passed a string to a parser that did not  
match the grammar defined by it. And the QueryParser is a parser, not  
a searcher. It apptempts to parse a query from the string value. If  
it was to do nothing then it would return null. And that would just  
cause another exception.


-- 
karl

>
> -----Original Message-----
> From: karl wettin [mailto:karl.wettin@gmail.com]
> Sent: 08 February 2007 18:05
> To: java-user@lucene.apache.org
> Subject: Re: Empty search
>
>
> 8 feb 2007 kl. 18.46 skrev Kainth, Sachin:
>
>> Is it my imagination or does lucene produce an error if you  
>> present it
>
>> with an empty string to search for?
>
> I presume you are referring to the QueryParser? It sounds about right
> that it would throw an exception at some point if you supplied it an
> empty input.
>
>
> --
> karl
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org
> For additional commands, e-mail: java-user-help@lucene.apache.org
>
>
>
> This message has been scanned for viruses by MailControl - (see
> http://bluepages.wsatkins.co.uk/?4318150)
>
>
> This email and any attached files are confidential and copyright  
> protected. If you are not the addressee, any dissemination of this  
> communication is strictly prohibited. Unless otherwise expressly  
> agreed in writing, nothing stated in this communication shall be  
> legally binding.
>
> The ultimate parent company of the Atkins Group is WS Atkins plc.   
> Registered in England No. 1885586.  Registered Office Woodcote  
> Grove, Ashley Road, Epsom, Surrey KT18 5BW.
>
> Consider the environment. Please don't print this e-mail unless you  
> really need to.
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org
> For additional commands, e-mail: java-user-help@lucene.apache.org
>


---------------------------------------------------------------------
To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org
For additional commands, e-mail: java-user-help@lucene.apache.org


Mime
View raw message