lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From loesh <lo...@kth.se>
Subject Re: Query.toString() and QueryParser.parse()
Date Wed, 22 Aug 2007 10:55:02 GMT
Erik Hatcher wrote:
>
> On Aug 22, 2007, at 6:34 AM, loesh wrote:
>> Query parsed = qp.parse(queryString);
>> String parsedString = parsed.toString();
>>
>> boolean equals = parsedString().equals(queryString);
>>
>> Maybe not the clearest of questions. but should "equals" in the above 
>> example allways be true for any Query?
>
> No, that never has been a design goal of Query.toString(), and there 
> many cases that it fails.  QueryParser only supports a fraction of the 
> Query subclasses out there, so any Query subclass it does not support, 
> of course, will fail to parse as you're expecting.
>
> I understand the benefit such a feature would have, though.
>
>     Erik
>
>
Ok, thanks for the fast reply. I kind of figured it was not supposed to 
be that way but it would have some benefits.


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


Mime
View raw message