Hi all. I have been using the new query parser framework fairly heavily, although our use case is largely for *generating* queries rather than parsing them - the intermediate query nodes happened to be a very good model for doing this without all the usual nightmares of thinking about the escape syntax, and without having to think about how each query is encoded, which is the usual drawback of using Query objects directly.
But I have some questions. 1. Is it intentional that query nodes do not implement equals()? I had rather a lot of overhead when writing unit tests due to being unable to use it - it's either (a) define a Matcher for every single QueryNode class, or (b) toString() it and perform some sanitisation (which is what we're doing.) 2. Is there a plan to introduce a QuerySyntaxFormatter interface as a counterpart to QuerySyntaxParser, for generating the same query format using the nodes that would have been generated when parsing it (obviously with a small change in format in some situations)? 3. I have been parsing a lot of boolean queries, and have noticed that there is *always* a GroupQueryNode around any BooleanQueryNode. Is this really required, given that BooleanQueryNode is already implicitly a grouping type of query? 4. If GroupQueryNode is specifically a cue to whether the user specified parentheses or not (i.e. if it is supposed to be cosmetic, for the purposes of getting back to what the user typed in) then why is it that "tag:a tag:b" and "tag:(a b)" both parse to the same node structure (making it impossible to figure out which the user actually used)? Daniel -- Daniel Noll Forensic and eDiscovery Software Senior Developer The world's most advanced Nuix email data analysis http://nuix.com/ and eDiscovery software --------------------------------------------------------------------- To unsubscribe, e-mail: java-user-unsubscr...@lucene.apache.org For additional commands, e-mail: java-user-h...@lucene.apache.org