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 22987] New: - QueryParser not working on trivial query
Date Mon, 08 Sep 2003 13:52:56 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=22987>.
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=22987

QueryParser not working on trivial query

           Summary: QueryParser not working on trivial query
           Product: Lucene
           Version: CVS Nightly - Specify date in submission
          Platform: PC
        OS/Version: Linux
            Status: NEW
          Severity: Normal
          Priority: Other
         Component: QueryParser
        AssignedTo: lucene-dev@jakarta.apache.org
        ReportedBy: pifpafpuf@gmx.de


This happens with lucene-20030906.

Running 

  java LucQuery /dir/to/index 'FNID:200'

I get not output. Enhancing this to

  java LucQuery /dir/to/index 'FNID:200*'

I get the following output:

Document<Keyword<FNID:200> Keyword<filename:/some/filename>>

The output is generated by this:

public class LucQuery {
  public static void main(String[] argv) throws IOException,ParseException {
    IndexSearcher search = new IndexSearcher(argv[0]);
    Query p = QueryParser.parse(argv[1], "body", new SimpleAnalyzer());
    Hits h = search.search(p);
    for(int i=0; i<h.length(); i++) {
      System.out.println(h.doc(i));
    }
  }      
}

Given the output produced, I would expect the
first query to result in that same output.

Mime
View raw message