If you are refering to QueryParser, and if you mean that you want Lucene to *find everything* when you actually say *search for nothing*, you could easily extend current Queryparser to suit your needs:

public class MyQueryParser extends QueryParser
{
    public MyQueryParser(String f, Analyzer a)
    {
        super(f, a);
    }

    public Query parse(String query) throws ParseException
    {
        if (null == query || query.trim().length() == 0)
        {
            return new MatchAllDocsQuery();
        }
        return super.parse(query);
    }
}

Regards,
Ronnie

Quoting "Kainth, Sachin" <[EMAIL PROTECTED]>:

Is it my imagination or does lucene produce an error if you present it
with an empty string to search for?


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: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to