lucene-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Michael McCandless (JIRA)" <>
Subject [jira] [Commented] (LUCENE-3273) Convert Lucene Core tests over to a simple MockQueryParser
Date Mon, 04 Jul 2011 18:38:21 GMT


Michael McCandless commented on LUCENE-3273:

I would also prefer to keep tests very straightforward, even if that makes them more verbose.
 Ie just use the Lucene core API, and if the core API is insufficient we should improve it.
 I don't think we should be adding very much special test-only APIs.

In fact, why even add a builder here for BQ?  Can't we just make the BQ and add the clauses?

In general I'm not a fan of builder APIs... I think they are over-applied these days (hammer!)
and I don't think we need it here for our tests.

> Convert Lucene Core tests over to a simple MockQueryParser
> ----------------------------------------------------------
>                 Key: LUCENE-3273
>                 URL:
>             Project: Lucene - Java
>          Issue Type: Sub-task
>          Components: core/other
>            Reporter: Chris Male
>         Attachments: LUCENE-3273.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:


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

View raw message