lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From loesh <lo...@kth.se>
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?

Sincerley,
Fredrik Ståhl


---------------------------------------------------------------------
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