@Test @SuppressWarnings("unchecked") public void getDetailsFromESBySizeTest() throws Exception { final ElasticSearchRepository classUnderTest = PowerMockito.spy(new ElasticSearchRepository()); ReflectionTestUtils.setField(classUnderTest, "esUrl", "esUrl123"); mockStatic(Strings.class); mockStatic(PacHttpUtils.class); PowerMockito.when(Strings.isNullOrEmpty(anyString())).thenReturn(false); String response = "{\"result\":\"updated\", \"hits\":{\"total\":1000,\"max_score\":null,\"hits\":[{\"_index\":\"bank\",\"_type\":\"_doc\",\"_id\":\"0\",\"sort\":[0],\"_score\":null,\"_source\":{\"account_number\":0,\"balance\":16623,\"firstname\":\"Bradshaw\",\"lastname\":\"Mckenzie\",\"age\":29,\"gender\":\"F\",\"address\":\"244 Columbus Place\",\"employer\":\"Euron\",\"email\":\"bradshawmckenzie@euron.com\",\"city\":\"Hobucken\",\"state\":\"CO\"}}]},\"aggregations\":{\"accountid\":{\"buckets\":[{\"accountname\":{\"buckets\" :[{\"key\":\"key678\"}]},\"key\":\"key123\"},{\"accountname\":{\"buckets\" :[{\"key\":\"key566\"}]},\"key\":\"key455\"}]}}}"; PowerMockito.when(PacHttpUtils.doHttpPost(anyString(), anyString())).thenReturn(response); assertThat(classUnderTest.getDetailsFromESBySize(eq("dataSource"), eq("targetType"), anyMap(), anyMap(), anyObject(), anyList(), eq(1), eq(1), anyString(), anyMap()).size(), is(1)); }
public 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) throws Exception { StringBuilder urlToQueryBuffer = new StringBuilder(esUrl).append(FORWARD_SLASH).append(dataSource); if (!Strings.isNullOrEmpty(targetType)) { urlToQueryBuffer.append(FORWARD_SLASH).append(targetType); } urlToQueryBuffer.append(FORWARD_SLASH).append(_SEARCH); if (size > 0 && from >= 0) { urlToQueryBuffer.append("?").append("size=").append(size).append("&").append("from=").append(from); } String urlToQuery = urlToQueryBuffer.toString(); List<LinkedHashMap<String, Object>> results = new ArrayList<LinkedHashMap<String, Object>>(); Map<String, Object> requestBody = new HashMap<String, Object>(); Map<String, Map<String, String>> auditDate = new HashMap<String, Map<String, String>>(); Map<String, String> order = new HashMap<String, String>(); order.put(ORDER, "desc"); auditDate.put("auditdate", order); List<Map<String, Map<String, String>>> list = new ArrayList<Map<String, Map<String, String>>>(); list.add(auditDate); requestBody.put(SORT, list); if (size > 0) { requestBody.put(SIZE, size); } requestBody.put(QUERY, buildQuery(mustFilter, mustNotFilter, shouldFilter, searchText, mustTermsFilter,null)); requestBody.put(_SOURCE, fields); Gson serializer = new GsonBuilder().create(); String request = serializer.toJson(requestBody); String responseDetails = null; try { responseDetails = PacHttpUtils.doHttpPost(urlToQuery, request); serializer = new GsonBuilder().create(); Map<String, Object> response = (Map<String, Object>) serializer.fromJson(responseDetails, Object.class); if (response.containsKey(HITS)) { Map<String, Object> hits = (Map<String, Object>) response.get(HITS); if (hits.containsKey(HITS)) { List<Map<String, Object>> hitDetails = (List<Map<String, Object>>) hits.get(HITS); if (!hitDetails.isEmpty()) { for (Map<String, Object> hitDetail : hitDetails) { Map<String, Object> sources = (Map<String, Object>) hitDetail.get(_SOURCE); results.add(CommonUtils.flatNestedLinkedHashMap(null, sources)); } } else { throw new RuntimeException(NO_RECORDS_FOUND); } } } } catch (Exception e) { LOGGER.error(ERROR_RETRIEVING_INVENTORY_FROM_ES, e); throw e; } return results; }
ElasticSearchRepository implements Constants { public 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) throws Exception { StringBuilder urlToQueryBuffer = new StringBuilder(esUrl).append(FORWARD_SLASH).append(dataSource); if (!Strings.isNullOrEmpty(targetType)) { urlToQueryBuffer.append(FORWARD_SLASH).append(targetType); } urlToQueryBuffer.append(FORWARD_SLASH).append(_SEARCH); if (size > 0 && from >= 0) { urlToQueryBuffer.append("?").append("size=").append(size).append("&").append("from=").append(from); } String urlToQuery = urlToQueryBuffer.toString(); List<LinkedHashMap<String, Object>> results = new ArrayList<LinkedHashMap<String, Object>>(); Map<String, Object> requestBody = new HashMap<String, Object>(); Map<String, Map<String, String>> auditDate = new HashMap<String, Map<String, String>>(); Map<String, String> order = new HashMap<String, String>(); order.put(ORDER, "desc"); auditDate.put("auditdate", order); List<Map<String, Map<String, String>>> list = new ArrayList<Map<String, Map<String, String>>>(); list.add(auditDate); requestBody.put(SORT, list); if (size > 0) { requestBody.put(SIZE, size); } requestBody.put(QUERY, buildQuery(mustFilter, mustNotFilter, shouldFilter, searchText, mustTermsFilter,null)); requestBody.put(_SOURCE, fields); Gson serializer = new GsonBuilder().create(); String request = serializer.toJson(requestBody); String responseDetails = null; try { responseDetails = PacHttpUtils.doHttpPost(urlToQuery, request); serializer = new GsonBuilder().create(); Map<String, Object> response = (Map<String, Object>) serializer.fromJson(responseDetails, Object.class); if (response.containsKey(HITS)) { Map<String, Object> hits = (Map<String, Object>) response.get(HITS); if (hits.containsKey(HITS)) { List<Map<String, Object>> hitDetails = (List<Map<String, Object>>) hits.get(HITS); if (!hitDetails.isEmpty()) { for (Map<String, Object> hitDetail : hitDetails) { Map<String, Object> sources = (Map<String, Object>) hitDetail.get(_SOURCE); results.add(CommonUtils.flatNestedLinkedHashMap(null, sources)); } } else { throw new RuntimeException(NO_RECORDS_FOUND); } } } } catch (Exception e) { LOGGER.error(ERROR_RETRIEVING_INVENTORY_FROM_ES, e); throw e; } return results; } }
ElasticSearchRepository implements Constants { public 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) throws Exception { StringBuilder urlToQueryBuffer = new StringBuilder(esUrl).append(FORWARD_SLASH).append(dataSource); if (!Strings.isNullOrEmpty(targetType)) { urlToQueryBuffer.append(FORWARD_SLASH).append(targetType); } urlToQueryBuffer.append(FORWARD_SLASH).append(_SEARCH); if (size > 0 && from >= 0) { urlToQueryBuffer.append("?").append("size=").append(size).append("&").append("from=").append(from); } String urlToQuery = urlToQueryBuffer.toString(); List<LinkedHashMap<String, Object>> results = new ArrayList<LinkedHashMap<String, Object>>(); Map<String, Object> requestBody = new HashMap<String, Object>(); Map<String, Map<String, String>> auditDate = new HashMap<String, Map<String, String>>(); Map<String, String> order = new HashMap<String, String>(); order.put(ORDER, "desc"); auditDate.put("auditdate", order); List<Map<String, Map<String, String>>> list = new ArrayList<Map<String, Map<String, String>>>(); list.add(auditDate); requestBody.put(SORT, list); if (size > 0) { requestBody.put(SIZE, size); } requestBody.put(QUERY, buildQuery(mustFilter, mustNotFilter, shouldFilter, searchText, mustTermsFilter,null)); requestBody.put(_SOURCE, fields); Gson serializer = new GsonBuilder().create(); String request = serializer.toJson(requestBody); String responseDetails = null; try { responseDetails = PacHttpUtils.doHttpPost(urlToQuery, request); serializer = new GsonBuilder().create(); Map<String, Object> response = (Map<String, Object>) serializer.fromJson(responseDetails, Object.class); if (response.containsKey(HITS)) { Map<String, Object> hits = (Map<String, Object>) response.get(HITS); if (hits.containsKey(HITS)) { List<Map<String, Object>> hitDetails = (List<Map<String, Object>>) hits.get(HITS); if (!hitDetails.isEmpty()) { for (Map<String, Object> hitDetail : hitDetails) { Map<String, Object> sources = (Map<String, Object>) hitDetail.get(_SOURCE); results.add(CommonUtils.flatNestedLinkedHashMap(null, sources)); } } else { throw new RuntimeException(NO_RECORDS_FOUND); } } } } catch (Exception e) { LOGGER.error(ERROR_RETRIEVING_INVENTORY_FROM_ES, e); throw e; } return results; }  }
ElasticSearchRepository implements Constants { public 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) throws Exception { StringBuilder urlToQueryBuffer = new StringBuilder(esUrl).append(FORWARD_SLASH).append(dataSource); if (!Strings.isNullOrEmpty(targetType)) { urlToQueryBuffer.append(FORWARD_SLASH).append(targetType); } urlToQueryBuffer.append(FORWARD_SLASH).append(_SEARCH); if (size > 0 && from >= 0) { urlToQueryBuffer.append("?").append("size=").append(size).append("&").append("from=").append(from); } String urlToQuery = urlToQueryBuffer.toString(); List<LinkedHashMap<String, Object>> results = new ArrayList<LinkedHashMap<String, Object>>(); Map<String, Object> requestBody = new HashMap<String, Object>(); Map<String, Map<String, String>> auditDate = new HashMap<String, Map<String, String>>(); Map<String, String> order = new HashMap<String, String>(); order.put(ORDER, "desc"); auditDate.put("auditdate", order); List<Map<String, Map<String, String>>> list = new ArrayList<Map<String, Map<String, String>>>(); list.add(auditDate); requestBody.put(SORT, list); if (size > 0) { requestBody.put(SIZE, size); } requestBody.put(QUERY, buildQuery(mustFilter, mustNotFilter, shouldFilter, searchText, mustTermsFilter,null)); requestBody.put(_SOURCE, fields); Gson serializer = new GsonBuilder().create(); String request = serializer.toJson(requestBody); String responseDetails = null; try { responseDetails = PacHttpUtils.doHttpPost(urlToQuery, request); serializer = new GsonBuilder().create(); Map<String, Object> response = (Map<String, Object>) serializer.fromJson(responseDetails, Object.class); if (response.containsKey(HITS)) { Map<String, Object> hits = (Map<String, Object>) response.get(HITS); if (hits.containsKey(HITS)) { List<Map<String, Object>> hitDetails = (List<Map<String, Object>>) hits.get(HITS); if (!hitDetails.isEmpty()) { for (Map<String, Object> hitDetail : hitDetails) { Map<String, Object> sources = (Map<String, Object>) hitDetail.get(_SOURCE); results.add(CommonUtils.flatNestedLinkedHashMap(null, sources)); } } else { throw new RuntimeException(NO_RECORDS_FOUND); } } } } catch (Exception e) { LOGGER.error(ERROR_RETRIEVING_INVENTORY_FROM_ES, e); throw e; } return results; }  @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 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) throws Exception { StringBuilder urlToQueryBuffer = new StringBuilder(esUrl).append(FORWARD_SLASH).append(dataSource); if (!Strings.isNullOrEmpty(targetType)) { urlToQueryBuffer.append(FORWARD_SLASH).append(targetType); } urlToQueryBuffer.append(FORWARD_SLASH).append(_SEARCH); if (size > 0 && from >= 0) { urlToQueryBuffer.append("?").append("size=").append(size).append("&").append("from=").append(from); } String urlToQuery = urlToQueryBuffer.toString(); List<LinkedHashMap<String, Object>> results = new ArrayList<LinkedHashMap<String, Object>>(); Map<String, Object> requestBody = new HashMap<String, Object>(); Map<String, Map<String, String>> auditDate = new HashMap<String, Map<String, String>>(); Map<String, String> order = new HashMap<String, String>(); order.put(ORDER, "desc"); auditDate.put("auditdate", order); List<Map<String, Map<String, String>>> list = new ArrayList<Map<String, Map<String, String>>>(); list.add(auditDate); requestBody.put(SORT, list); if (size > 0) { requestBody.put(SIZE, size); } requestBody.put(QUERY, buildQuery(mustFilter, mustNotFilter, shouldFilter, searchText, mustTermsFilter,null)); requestBody.put(_SOURCE, fields); Gson serializer = new GsonBuilder().create(); String request = serializer.toJson(requestBody); String responseDetails = null; try { responseDetails = PacHttpUtils.doHttpPost(urlToQuery, request); serializer = new GsonBuilder().create(); Map<String, Object> response = (Map<String, Object>) serializer.fromJson(responseDetails, Object.class); if (response.containsKey(HITS)) { Map<String, Object> hits = (Map<String, Object>) response.get(HITS); if (hits.containsKey(HITS)) { List<Map<String, Object>> hitDetails = (List<Map<String, Object>>) hits.get(HITS); if (!hitDetails.isEmpty()) { for (Map<String, Object> hitDetail : hitDetails) { Map<String, Object> sources = (Map<String, Object>) hitDetail.get(_SOURCE); results.add(CommonUtils.flatNestedLinkedHashMap(null, sources)); } } else { throw new RuntimeException(NO_RECORDS_FOUND); } } } } catch (Exception e) { LOGGER.error(ERROR_RETRIEVING_INVENTORY_FROM_ES, e); throw e; } return results; }  @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);  }