@Test public void testDoQueryObject() { try { String querystr = "foo"; Query q = new QueryParser("uri", analyzer).parse(querystr); Collection<Identifiable> results = searchService.doQuery(q, new SingleFieldURIMapper("uri"), dao); assertEquals("Wrong number of results", 1, results.size()); assertTrue("Identifiable 'foo' not found", results.contains(foo)); querystr = "bar"; q = new QueryParser("uri", analyzer).parse(querystr); results = searchService.doQuery(q, new SingleFieldURIMapper("uri"), dao); assertEquals("Wrong number of results", 1, results.size()); assertTrue("Identifiable 'bar' not found", results.contains(bar)); querystr = "baz"; q = new QueryParser("uri", analyzer).parse(querystr); results = searchService.doQuery(q, new SingleFieldURIMapper("uri"), dao); assertEquals("Wrong number of results", 1, results.size()); assertTrue("Identifiable 'baz' not found", results.contains(baz)); } catch (ParseException e) { e.printStackTrace(); fail(); } catch (IOException e) { e.printStackTrace(); fail(); } }
protected <T> List<T> doQuery(Query q, LuceneDocumentMapper<T> mapper) { return doQuery(q, mapper, -1); }
ZoomaLuceneSearchService extends Initializable { protected <T> List<T> doQuery(Query q, LuceneDocumentMapper<T> mapper) { return doQuery(q, mapper, -1); } }
ZoomaLuceneSearchService extends Initializable { protected <T> List<T> doQuery(Query q, LuceneDocumentMapper<T> mapper) { return doQuery(q, mapper, -1); }  }
ZoomaLuceneSearchService extends Initializable { protected <T> List<T> doQuery(Query q, LuceneDocumentMapper<T> mapper) { return doQuery(q, mapper, -1); }  void setConfigurationProperties(Properties configuration); void setIndex(Directory index); void setSimilarity(Similarity similarity); Query formulateExactCombinedQuery(Query[] q, String fieldName, Object[] items); }
ZoomaLuceneSearchService extends Initializable { protected <T> List<T> doQuery(Query q, LuceneDocumentMapper<T> mapper) { return doQuery(q, mapper, -1); }  void setConfigurationProperties(Properties configuration); void setIndex(Directory index); void setSimilarity(Similarity similarity); Query formulateExactCombinedQuery(Query[] q, String fieldName, Object[] items);  }