List of usage examples for org.apache.lucene.queryParser.surround.query BasicQueryFactory BasicQueryFactory
public BasicQueryFactory()
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 . j a v a 2 s. com*/ } assertEquals(5, count); }