@Test public void buildScrollRequestTest() { final ElasticSearchRepository classUnderTest = PowerMockito.spy(new ElasticSearchRepository()); assertThat(classUnderTest.buildScrollRequest(eq("123"), eq("esPageScrollTtl")), is("{\"scroll\":\"2m\"}")); }
public String buildScrollRequest(String scrollId, String esPageScrollTtl) { Map<String, Object> requestBody = new HashMap<String, Object>(); requestBody.put("scroll", ES_PAGE_SCROLL_TTL); requestBody.put("scroll_id", scrollId); Gson serializer = new GsonBuilder().create(); return serializer.toJson(requestBody); }
ElasticSearchRepository implements Constants { public String buildScrollRequest(String scrollId, String esPageScrollTtl) { Map<String, Object> requestBody = new HashMap<String, Object>(); requestBody.put("scroll", ES_PAGE_SCROLL_TTL); requestBody.put("scroll_id", scrollId); Gson serializer = new GsonBuilder().create(); return serializer.toJson(requestBody); } }
ElasticSearchRepository implements Constants { public String buildScrollRequest(String scrollId, String esPageScrollTtl) { Map<String, Object> requestBody = new HashMap<String, Object>(); requestBody.put("scroll", ES_PAGE_SCROLL_TTL); requestBody.put("scroll_id", scrollId); Gson serializer = new GsonBuilder().create(); return serializer.toJson(requestBody); }  }
ElasticSearchRepository implements Constants { public String buildScrollRequest(String scrollId, String esPageScrollTtl) { Map<String, Object> requestBody = new HashMap<String, Object>(); requestBody.put("scroll", ES_PAGE_SCROLL_TTL); requestBody.put("scroll_id", scrollId); Gson serializer = new GsonBuilder().create(); return serializer.toJson(requestBody); }  @SuppressWarnings("unchecked") @Deprecated List<Map<String, Object>> getDataFromES(String dataSource, String targetType, Map<String, Object> mustFilter,
			final Map<String, Object> mustNotFilter, final HashMultimap<String, Object> shouldFilter,
			List<String> fields, Map<String, Object> mustTermsFilter); @SuppressWarnings("unchecked") List<Map<String, Object>> getSortedDataFromES(String dataSource, String targetType,
			Map<String, Object> mustFilter, final Map<String, Object> mustNotFilter,
			final HashMultimap<String, Object> shouldFilter, List<String> fields, Map<String, Object> mustTermsFilter,
			List<Map<String, Object>> sortFieldMapList); Map<String, Object> buildAggs(String distributionName, int size, String aggsName, Map<String, Object> nestedAggs); Map<String, Object> buildQuery(final Map<String, Object> mustFilter, final Map<String, Object> mustNotFilter,
			final HashMultimap<String, Object> shouldFilter, final String searchText,
			final Map<String, Object> mustTermsFilter,Map<String, List<String>> matchPhrasePrefix); String buildScrollRequest(String scrollId, String esPageScrollTtl); String processResponseAndSendTheScrollBack(String responseDetails, List<Map<String, Object>> results); @SuppressWarnings("unchecked") long getTotalDocumentCountForIndexAndType(String index, String type, Map<String, Object> mustFilter,
			Map<String, Object> mustNotFilter, HashMultimap<String, Object> shouldFilter, String searchText,
			Map<String, Object> mustTermsFilter); Map<String, Long> getTotalDistributionForIndexAndType(String index, String type,
			Map<String, Object> mustFilter, Map<String, Object> mustNotFilter,
			HashMultimap<String, Object> shouldFilter, String aggsFilter, int size, Map<String, Object> mustTermsFilter); String buildAggsURL(String url, String index, String type); List<Map<String, Object>> getUtilizationByAssetGroup(String asseGroup); @Deprecated List<Map<String, Object>> getDataFromESBySize(String dataSource, String targetType,
			final Map<String, Object> mustFilter, final Map<String, Object> mustNotFilter,
			final HashMultimap<String, Object> shouldFilter, List<String> fields, int from, int size, String searchText,
			final Map<String, Object> mustTermsFilter); List<Map<String, Object>> getSortedDataFromESBySize(String dataSource, String targetType,
			final Map<String, Object> mustFilter, final Map<String, Object> mustNotFilter,
			final HashMultimap<String, Object> shouldFilter, List<String> fields, int from, int size, String searchText,
			final Map<String, Object> mustTermsFilter, List<Map<String, Object>> sortFieldMapList); @SuppressWarnings("unchecked") Boolean updatePartialDataToES(String dataSource, String targetType, String id, String routing, String parent,
			Map<String, Object> partialDocument); @SuppressWarnings("unchecked") Boolean saveExceptionDataToES(String dataSource, String routing, Map<String, Object> data); Map<String, Long> getTotalDistributionForIndexAndTypeBySize(String index, String type,
			Map<String, Object> mustFilter, Map<String, Object> mustNotFilter,
			HashMultimap<String, Object> shouldFilter, String aggsFilter, int size, int from, String searchText); Map<String, Long> getDateHistogramForIndexAndTypeByInterval(String index, String type,
			Map<String, Object> mustFilter, Map<String, Object> mustNotFilter,
			HashMultimap<String, Object> shouldFilter, String dateFieldName, String interval); Map<String, String> getAccountsByMultiAggs(String index, String type, Map<String, Object> filter,
			Map<String, Object> mustNotFilter, HashMultimap<String, Object> shouldFilter,
			Map<String, Object> aggsFilter, int size); List<LinkedHashMap<String, Object>> getDetailsFromESBySize(String dataSource, String targetType,
			final Map<String, Object> mustFilter, final Map<String, Object> mustNotFilter,
			final HashMultimap<String, Object> shouldFilter, List<String> fields, int from, int size, String searchText,
			final Map<String, Object> mustTermsFilter); @SuppressWarnings("unchecked") @Deprecated List<Map<String, Object>> getDataFromESWithMustNotTermsFilter(String dataSource, String targetType,
			Map<String, Object> mustFilter, final Map<String, Object> mustNotFilter,
			final HashMultimap<String, Object> shouldFilter, List<String> fields, Map<String, Object> mustTermsFilter,
			Map<String, Object> mustNotTermsFilter, Map<String, Object> mustNotWildCardFilter); @SuppressWarnings("unchecked") List<Map<String, Object>> getSortedDataFromESWithMustNotTermsFilter(String dataSource, String targetType,
			Map<String, Object> mustFilter, final Map<String, Object> mustNotFilter,
			final HashMultimap<String, Object> shouldFilter, List<String> fields, Map<String, Object> mustTermsFilter,
			Map<String, Object> mustNotTermsFilter, Map<String, Object> mustNotWildCardFilter,
			List<Map<String, Object>> sortFieldMapList); long getTotalDocumentCountForIndexAndTypeWithMustNotTermsFilter(String index, String type,
			Map<String, Object> mustFilter, Map<String, Object> mustNotFilter,
			HashMultimap<String, Object> shouldFilter, String searchText, Map<String, Object> mustTermsFilter,
			Map<String, Object> mustNotTermsFilter, Map<String, Object> mustNotWildCardFilter); @SuppressWarnings("unchecked") long getTotalDistributionForIndexAndTypeWithMatchPhrase(String index, String type,
			Map<String, Object> mustFilter, Map<String, Object> mustNotFilter,
			HashMultimap<String, Object> shouldFilter, String searchText,
			Map<String, Object> mustTermsFilter,
			Map<String, List<String>> matchPhrasePrefix); String buildESURL(String url, String index, String type, int size, int from); Map<String, Object> getEnvAndTotalDistributionForIndexAndType(String index, String type,
			Map<String, Object> mustFilter, Map<String, Object> mustNotFilter,
			HashMultimap<String, Object> shouldFilter, String aggsFilter, Map<String, Object> nestedaggs, int size, Map<String, Object> mustTermsFilter); }
ElasticSearchRepository implements Constants { public String buildScrollRequest(String scrollId, String esPageScrollTtl) { Map<String, Object> requestBody = new HashMap<String, Object>(); requestBody.put("scroll", ES_PAGE_SCROLL_TTL); requestBody.put("scroll_id", scrollId); Gson serializer = new GsonBuilder().create(); return serializer.toJson(requestBody); }  @SuppressWarnings("unchecked") @Deprecated List<Map<String, Object>> getDataFromES(String dataSource, String targetType, Map<String, Object> mustFilter,
			final Map<String, Object> mustNotFilter, final HashMultimap<String, Object> shouldFilter,
			List<String> fields, Map<String, Object> mustTermsFilter); @SuppressWarnings("unchecked") List<Map<String, Object>> getSortedDataFromES(String dataSource, String targetType,
			Map<String, Object> mustFilter, final Map<String, Object> mustNotFilter,
			final HashMultimap<String, Object> shouldFilter, List<String> fields, Map<String, Object> mustTermsFilter,
			List<Map<String, Object>> sortFieldMapList); Map<String, Object> buildAggs(String distributionName, int size, String aggsName, Map<String, Object> nestedAggs); Map<String, Object> buildQuery(final Map<String, Object> mustFilter, final Map<String, Object> mustNotFilter,
			final HashMultimap<String, Object> shouldFilter, final String searchText,
			final Map<String, Object> mustTermsFilter,Map<String, List<String>> matchPhrasePrefix); String buildScrollRequest(String scrollId, String esPageScrollTtl); String processResponseAndSendTheScrollBack(String responseDetails, List<Map<String, Object>> results); @SuppressWarnings("unchecked") long getTotalDocumentCountForIndexAndType(String index, String type, Map<String, Object> mustFilter,
			Map<String, Object> mustNotFilter, HashMultimap<String, Object> shouldFilter, String searchText,
			Map<String, Object> mustTermsFilter); Map<String, Long> getTotalDistributionForIndexAndType(String index, String type,
			Map<String, Object> mustFilter, Map<String, Object> mustNotFilter,
			HashMultimap<String, Object> shouldFilter, String aggsFilter, int size, Map<String, Object> mustTermsFilter); String buildAggsURL(String url, String index, String type); List<Map<String, Object>> getUtilizationByAssetGroup(String asseGroup); @Deprecated List<Map<String, Object>> getDataFromESBySize(String dataSource, String targetType,
			final Map<String, Object> mustFilter, final Map<String, Object> mustNotFilter,
			final HashMultimap<String, Object> shouldFilter, List<String> fields, int from, int size, String searchText,
			final Map<String, Object> mustTermsFilter); List<Map<String, Object>> getSortedDataFromESBySize(String dataSource, String targetType,
			final Map<String, Object> mustFilter, final Map<String, Object> mustNotFilter,
			final HashMultimap<String, Object> shouldFilter, List<String> fields, int from, int size, String searchText,
			final Map<String, Object> mustTermsFilter, List<Map<String, Object>> sortFieldMapList); @SuppressWarnings("unchecked") Boolean updatePartialDataToES(String dataSource, String targetType, String id, String routing, String parent,
			Map<String, Object> partialDocument); @SuppressWarnings("unchecked") Boolean saveExceptionDataToES(String dataSource, String routing, Map<String, Object> data); Map<String, Long> getTotalDistributionForIndexAndTypeBySize(String index, String type,
			Map<String, Object> mustFilter, Map<String, Object> mustNotFilter,
			HashMultimap<String, Object> shouldFilter, String aggsFilter, int size, int from, String searchText); Map<String, Long> getDateHistogramForIndexAndTypeByInterval(String index, String type,
			Map<String, Object> mustFilter, Map<String, Object> mustNotFilter,
			HashMultimap<String, Object> shouldFilter, String dateFieldName, String interval); Map<String, String> getAccountsByMultiAggs(String index, String type, Map<String, Object> filter,
			Map<String, Object> mustNotFilter, HashMultimap<String, Object> shouldFilter,
			Map<String, Object> aggsFilter, int size); List<LinkedHashMap<String, Object>> getDetailsFromESBySize(String dataSource, String targetType,
			final Map<String, Object> mustFilter, final Map<String, Object> mustNotFilter,
			final HashMultimap<String, Object> shouldFilter, List<String> fields, int from, int size, String searchText,
			final Map<String, Object> mustTermsFilter); @SuppressWarnings("unchecked") @Deprecated List<Map<String, Object>> getDataFromESWithMustNotTermsFilter(String dataSource, String targetType,
			Map<String, Object> mustFilter, final Map<String, Object> mustNotFilter,
			final HashMultimap<String, Object> shouldFilter, List<String> fields, Map<String, Object> mustTermsFilter,
			Map<String, Object> mustNotTermsFilter, Map<String, Object> mustNotWildCardFilter); @SuppressWarnings("unchecked") List<Map<String, Object>> getSortedDataFromESWithMustNotTermsFilter(String dataSource, String targetType,
			Map<String, Object> mustFilter, final Map<String, Object> mustNotFilter,
			final HashMultimap<String, Object> shouldFilter, List<String> fields, Map<String, Object> mustTermsFilter,
			Map<String, Object> mustNotTermsFilter, Map<String, Object> mustNotWildCardFilter,
			List<Map<String, Object>> sortFieldMapList); long getTotalDocumentCountForIndexAndTypeWithMustNotTermsFilter(String index, String type,
			Map<String, Object> mustFilter, Map<String, Object> mustNotFilter,
			HashMultimap<String, Object> shouldFilter, String searchText, Map<String, Object> mustTermsFilter,
			Map<String, Object> mustNotTermsFilter, Map<String, Object> mustNotWildCardFilter); @SuppressWarnings("unchecked") long getTotalDistributionForIndexAndTypeWithMatchPhrase(String index, String type,
			Map<String, Object> mustFilter, Map<String, Object> mustNotFilter,
			HashMultimap<String, Object> shouldFilter, String searchText,
			Map<String, Object> mustTermsFilter,
			Map<String, List<String>> matchPhrasePrefix); String buildESURL(String url, String index, String type, int size, int from); Map<String, Object> getEnvAndTotalDistributionForIndexAndType(String index, String type,
			Map<String, Object> mustFilter, Map<String, Object> mustNotFilter,
			HashMultimap<String, Object> shouldFilter, String aggsFilter, Map<String, Object> nestedaggs, int size, Map<String, Object> mustTermsFilter);  }