lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Rupinder Singh Mazara" <>
Subject QueryParsing
Date Mon, 18 Oct 2004 18:39:42 GMT
hi all

 i have a question regarding the QueryParser and Proximity Searches
 I executed the following piece of code

    String x = "\"jakarta apache\"~100";
    QueryParser parser = new QueryParser("FULL_TEXT",new
StandardAnalyzer() );
    parser.setOperator( QueryParser.DEFAULT_OPERATOR_AND );
    Query query = parser.parse(x);
    System.out.println(query.getClass()+" - "+query.toString());

    IndexReader indexReader =  new File(luceneroot) );

    query =  query.rewrite(indexReader);
    System.out.println(query.getClass()+" - "+query.toString());

in both System.out.println I get the following result
class - FULL_TEXT:"jakarta apache"~100

is this correct, I was expecting to see a SpanQuery being formed  at the
second println statement

I have take this from the example in

If I remove the quotes I see a QueryParsing error which tell me that the
Similarity should be between 0.0 and 1.0
which is as expected

please let me know if I missed something



To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message