lucene-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bugzi...@apache.org
Subject DO NOT REPLY [Bug 19686] New: - QueryParser removing wildcards in phrases in 1.3rc1
Date Mon, 05 May 2003 22:24:33 GMT
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG 
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://nagoya.apache.org/bugzilla/show_bug.cgi?id=19686>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND 
INSERTED IN THE BUG DATABASE.

http://nagoya.apache.org/bugzilla/show_bug.cgi?id=19686

QueryParser removing wildcards in phrases in 1.3rc1

           Summary: QueryParser removing wildcards in phrases in 1.3rc1
           Product: Lucene
           Version: unspecified
          Platform: PC
        OS/Version: Linux
            Status: NEW
          Severity: Normal
          Priority: Other
         Component: QueryParser
        AssignedTo: lucene-dev@jakarta.apache.org
        ReportedBy: jnorton@yellowbrix.com


QueryParser seems to be removing (replacing with space) wildcard characters in 
phrases in 1.3rc1.  I have only tried this with StandardAnalyzer - don't know 
if other Analyzers have the same problem.  The following code demonstrates the 
problem:

import java.io.*;
import org.apache.lucene.analysis.*;
import org.apache.lucene.analysis.standard.*;
import org.apache.lucene.search.*;
import org.apache.lucene.queryParser.*;

public class Test {
        public static void main(String[] args){
                try{
                        Query nonPhraseQuery = QueryParser.parse("Yellow*",
                                        "text", new StandardAnalyzer());
                        System.out.println("NON-PHRASE QUERY: " +
                                        nonPhraseQuery.toString());
                        Query phraseQuery = QueryParser.parse("\"Yellow*\"",
                                        "text", new StandardAnalyzer());
                        System.out.println("PHRASE QUERY: " +
                                        phraseQuery.toString());
                } catch(Exception e){
                        e.printStackTrace();
                }
        }
}

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


Mime
View raw message