assertThat(dfsResult.freqs()[0], equalTo(1));
}
@Test public void testDirectQuery() throws Exception {
QuerySearchResult queryResult = searchService.executeQueryPhase(searchRequest(searchSource().query(termQuery("name", "test1")), SearchType.QUERY_THEN_FETCH));
assertThat(queryResult.topDocs().totalHits, equalTo(1));
}
@Test public void testDirectFetch() throws Exception {
QueryFetchSearchResult queryFetchResult = searchService.executeFetchPhase(searchRequest(searchSource().query(termQuery("name", "test1")), SearchType.QUERY_AND_FETCH));
assertThat(queryFetchResult.queryResult().topDocs().totalHits, equalTo(1));