
loesh at kth
Aug 22, 2007, 3:55 AM
Post #3 of 3
(1559 views)
Permalink
|
|
Re: Query.toString() and QueryParser.parse()
[In reply to]
|
|
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 [at] lucene For additional commands, e-mail: java-user-help [at] lucene
|