lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jagadesh Nandasamy <>
Subject Re: 2 Questions
Date Wed, 01 May 2002 05:09:51 GMT
     I do not totally agree that in lucene *og would not match 'dog'.

     public ArrayList wildCardSearch(String query) throws Exception {
        String fieldsToSearch[] = { "fieldOne","path","date","uniqueId" };
        ArrayList docList  = new ArrayList();

        for(int i=0; i<fieldsToSearch.length; i++){
            BooleanQuery bQuery = new BooleanQuery();
            WildcardQuery wQuery = new WildcardQuery( new 
Term( fieldsToSearch[i], query ) );
            bQuery.add( wQuery, true, false );
            Hits hits =;           

            for(int j=0; j<hits.length(); j++){
                Document doc = hits.doc(j);
             return docList;

      Take this as a hint and work around it. It surely is working for me
       also take a look at this 


Aruna Raghavan wrote:

>#1 Yes. Look at the DateFilter implementation.
>#2 Look at the source code for SimpleAnalyzer to see what are the stopwords.
>I believe it removes more words when you index. I use StandardAnalyzer that
>works better for me. If I remember right, searches for alphanumerics did not
>work w/ Simple Analyzer. Also ,make sure to use the same kind of analyzer
>for both indexing and searching. A wildcard does not work when used as the
>first character in the word- for eg, *og for dog. Also, I believe wildcard
>searches are case sensitive.
>-----Original Message-----
>From: Joel Bernstein []
>Sent: Tuesday, April 30, 2002 1:04 PM
>To: Lucene Users List
>Subject: 2 Questions
>1)Does Lucine allow you to sort results by date?
>2) How do you execute a wildcard search?  I have 
>indexed four million documents using the SimpleAnalyzer.  When
>I execute a wildcard search using the SimpleAnalyzer the results returned
>are always 0.
>To unsubscribe, e-mail:   <>
>For additional commands, e-mail: <>

  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message