[ https://issues.apache.org/jira/browse/LUCENE-3273?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13059576#comment-13059576 ]
Hoss Man commented on LUCENE-3273: ---------------------------------- bq. In general I'm not a fan of builder APIs... I think they are over-applied these days (hammer!) bq. I think adding these 19 lines of code to this 343 line test case is worth every penny, because its much easier to see what any given test does, e.g. just glance real quick at testQueries06 and you see its a BQ with one MUST and two MUST_NOTS, no parsing by the brain required. i don't disagree with either of you. particularly in this test where the whole point is testing BooleanQueries -- so lets actually have the test showing the construction of a BooleanQuery. my point was more about tests where the construction of the Query object is ancillary to what the test is actually for. that said: definitely in agreement that using the core api and constructing the queries right in the test leaves no room for ambiguity -- my main point was that if we're going to have "builders" to simplify the tests, let's make them short and terse like the QP syntax that use to be in those tests. > Convert Lucene Core tests over to a simple MockQueryParser > ---------------------------------------------------------- > > Key: LUCENE-3273 > URL: https://issues.apache.org/jira/browse/LUCENE-3273 > Project: Lucene - Java > Issue Type: Sub-task > Components: core/other > Reporter: Chris Male > Attachments: LUCENE-3273.patch, LUCENE-3273_testboolean2.patch > > > Most tests use Lucene Core's QueryParser for convenience. We want to > consolidate it into a QP module which we can't have as a dependency. We > should add a simple MockQueryParser which does String.split() on the query > string, analyzers the terms and builds a BooleanQuery if necessary. Any more > complex Queries (such as phrases) should be done programmatically. -- This message is automatically generated by JIRA. For more information on JIRA, see: http://www.atlassian.com/software/jira --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscr...@lucene.apache.org For additional commands, e-mail: dev-h...@lucene.apache.org