List of usage examples for org.apache.lucene.queryparser.surround.parser QueryParser QueryParser
public QueryParser()
From source file:lux.IndexTest.java
License:Mozilla Public License
private void assertPathQuery(IndexTestSupport indexTestSupport) throws ParseException, IOException { SrndQuery q = new QueryParser().parse2("w(w({},\"ACT\"),\"SCENE\")"); Query q2 = q.makeLuceneQueryFieldNoBoost( indexTestSupport.indexer.getConfiguration().getFieldName(FieldRole.PATH), new BasicQueryFactory()); DocIdSetIterator iter = indexTestSupport.searcher.search(q2); int count = 0; while (iter.nextDoc() != DocIdSetIterator.NO_MORE_DOCS) { ++count;//from w w w . ja v a2 s . c o m } assertEquals(5, count); }