}
}
public void testMatchAllDocs() throws Exception {
QueryParser qp = new QueryParser("field", new WhitespaceAnalyzer());
assertEquals(new MatchAllDocsQuery(), qp.parse("*:*"));
assertEquals(new MatchAllDocsQuery(), qp.parse("(*:*)"));
BooleanQuery bq = (BooleanQuery)qp.parse("+*:* -*:*");
assertTrue(bq.getClauses()[0].getQuery() instanceof MatchAllDocsQuery);
assertTrue(bq.getClauses()[1].getQuery() instanceof MatchAllDocsQuery);
}