@Test public void testDoQueryString() { String querystr = "foo"; try { Query q = new QueryParser("name", analyzer).parse(querystr); Collection<String> results = searchService.doQuery(q, new SingleFieldStringMapper("name")); assertEquals("Wrong number of results", 4, results.size()); assertTrue(results.contains("foo")); assertTrue(results.contains("foo bar")); assertTrue(results.contains("foo bar baz")); assertTrue(results.contains("foo baz")); q = new QueryParser("uri", analyzer).parse(querystr); results = searchService.doQuery(q, new SingleFieldStringMapper("uri")); assertEquals("Wrong number of results", 4, results.size()); assertTrue(results.contains(convertToURI("foo").toString())); assertTrue(results.contains(convertToURI("foo bar").toString())); assertTrue(results.contains(convertToURI("foo bar baz").toString())); assertTrue(results.contains(convertToURI("foo baz").toString())); } 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);  }