[ https://issues.apache.org/jira/browse/LUCENE-3273?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Chris Male updated LUCENE-3273: ------------------------------- Attachment: LUCENE-3273.patch Patch with first shot at this. - MockQueryParser is introduced. It handles a very simple syntax consisting of boolean operators and can identify Wildcard queries. Cannot handle complex BooleanQuerys, boosts or PhraseQuerys. - QueryBuilderHelper is introduced which provides some utilities methods for building queries (currently just to create a TermQuery with a boost) - BooleanQueryBuilder and PhraseQueryBuilder are introduced to ease the process of programmatically creating complex BooleanQuerys and PhraseQuerys. - All core Lucene tests (apart from those in the queryparser package) have been moved away from relying on QueryParser. In extremely trivial situations, TermQuerys are now directly instantiated. In others, the MockQueryParser is used. In complex scenarios, the Builder classes are used to programmatically create the queries. - Some tests have been split up and moved around. Tests that did both parsing assertions and search assertions have been split so the parsing assertions go into TestQueryParser (since they are testing the QPs supported language). Next step is to visit the contrib tests and clear those out too, so we can prevent any back dependencies on the queryparser module. > 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 > > > 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