lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From loesh <>
Subject Query.toString() and QueryParser.parse()
Date Wed, 22 Aug 2007 10:34:20 GMT
 Hi, I am wondering if QueryParser.parse(...) is supposed to be able to 
recreate any given query using something like:

Query query = //creating query somehow.
Queryparser qp = //creatign a query parser

String queryString = query.toString();

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?

Fredrik Ståhl

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

View raw message