ElasticsearchSearcher { private Date getDate(SearchHit hit) { DateTime parseDateTime = ISODateTimeFormat.dateTimeParser().parseDateTime((String) hit.getFields().get("date").getValue()); return parseDateTime.toDate(); } ElasticsearchSearcher(Client client); SearchResponse search(String token); List<Result> getResults(SearchResponse response); Faceting getFacets(SearchResponse response); SearchResponse search(String token, Collection<String> filterQueries);  }
@Test public void dateIsAvailable() throws IOException { Result result = indexAndSearchSingle("test"); assertEquals(talk.date, result.getDate()); }