@Test public void testGetIndexSettings_01() { InputStream is = ESUtil.class.getResourceAsStream("/es-settings.json"); Map<String, Object> data = JsonUtil.deserialize(is); String[] settings = new String[] { "index.refresh_interval", "index.max_result_window" }; Map<String, String> config = getIndexSettings(TAXON, settings); ArrayList<String> keys = new ArrayList<>(config.keySet()); assertEquals("01", "index.refresh_interval", keys.get(0)); assertEquals("02", "index.max_result_window", keys.get(1)); ArrayList<String> values = new ArrayList<>(config.values()); assertEquals("03", JsonUtil.readField(data, "index.refresh_interval").toString(), values.get(0)); assertEquals("04", JsonUtil.readField(data, "index.max_result_window").toString(), values.get(1)); }
public static Map<String, String> getIndexSettings(DocumentType<?> dt, String... settings) { return getIndexSettings(dt.getIndexInfo(), settings); }
ESUtil { public static Map<String, String> getIndexSettings(DocumentType<?> dt, String... settings) { return getIndexSettings(dt.getIndexInfo(), settings); } }
ESUtil { public static Map<String, String> getIndexSettings(DocumentType<?> dt, String... settings) { return getIndexSettings(dt.getIndexInfo(), settings); } private  ESUtil(); }
ESUtil { public static Map<String, String> getIndexSettings(DocumentType<?> dt, String... settings) { return getIndexSettings(dt.getIndexInfo(), settings); } private  ESUtil(); static RestHighLevelClient esClient(); static T toDocumentObject(SearchHit hit, DocumentType<T> dt); static SearchRequest newSearchRequest(DocumentType<?> dt); static CountRequest newCountRequest(DocumentType<?> dt); static SearchResponse executeSearchRequest(SearchRequest request); static CountResponse executeCountRequest(CountRequest request); static String getElasticsearchId(SourceSystem sourceSystem, String sourceSystemId); static String getElasticsearchId(SourceSystem sourceSystem, int sourceSystemId); static Set<IndexInfo> getDistinctIndices(); static Set<IndexInfo> getDistinctIndices(DocumentType<?>... documentTypes); static void deleteAllIndices(); static void createAllIndices(); static void deleteIndex(DocumentType<?> documentType); static void deleteIndices(Set<IndexInfo> indices); static void deleteIndex(IndexInfo indexInfo); static void deleteIndex(String index); static void createIndex(DocumentType<?> documentType); static void createIndices(Set<IndexInfo> indices); @SuppressWarnings("unchecked") static void createIndex(IndexInfo indexInfo); static void clearCache(IndexInfo indexInfo); static String getIndexSetting(DocumentType<?> dt, String setting); static String getIndexSetting(IndexInfo indexInfo, String setting); static Map<String, String> getIndexSettings(DocumentType<?> dt, String... settings); static Map<String, String> getIndexSettings(IndexInfo indexInfo, String... settings); static void refreshIndex(DocumentType<?> documentType); static void refreshIndex(IndexInfo indexInfo); static String getAutoRefreshInterval(IndexInfo indexInfo); static Object disableAutoRefresh(IndexInfo indexInfo); static void setAutoRefreshInterval(IndexInfo indexInfo, String interval); static void createType(DocumentType<T> dt); static void truncate(DocumentType<T> dt); static void truncate(DocumentType<T> dt, SourceSystem ss); static Map<String, Object> getNbaMetadata(); }
ESUtil { public static Map<String, String> getIndexSettings(DocumentType<?> dt, String... settings) { return getIndexSettings(dt.getIndexInfo(), settings); } private  ESUtil(); static RestHighLevelClient esClient(); static T toDocumentObject(SearchHit hit, DocumentType<T> dt); static SearchRequest newSearchRequest(DocumentType<?> dt); static CountRequest newCountRequest(DocumentType<?> dt); static SearchResponse executeSearchRequest(SearchRequest request); static CountResponse executeCountRequest(CountRequest request); static String getElasticsearchId(SourceSystem sourceSystem, String sourceSystemId); static String getElasticsearchId(SourceSystem sourceSystem, int sourceSystemId); static Set<IndexInfo> getDistinctIndices(); static Set<IndexInfo> getDistinctIndices(DocumentType<?>... documentTypes); static void deleteAllIndices(); static void createAllIndices(); static void deleteIndex(DocumentType<?> documentType); static void deleteIndices(Set<IndexInfo> indices); static void deleteIndex(IndexInfo indexInfo); static void deleteIndex(String index); static void createIndex(DocumentType<?> documentType); static void createIndices(Set<IndexInfo> indices); @SuppressWarnings("unchecked") static void createIndex(IndexInfo indexInfo); static void clearCache(IndexInfo indexInfo); static String getIndexSetting(DocumentType<?> dt, String setting); static String getIndexSetting(IndexInfo indexInfo, String setting); static Map<String, String> getIndexSettings(DocumentType<?> dt, String... settings); static Map<String, String> getIndexSettings(IndexInfo indexInfo, String... settings); static void refreshIndex(DocumentType<?> documentType); static void refreshIndex(IndexInfo indexInfo); static String getAutoRefreshInterval(IndexInfo indexInfo); static Object disableAutoRefresh(IndexInfo indexInfo); static void setAutoRefreshInterval(IndexInfo indexInfo, String interval); static void createType(DocumentType<T> dt); static void truncate(DocumentType<T> dt); static void truncate(DocumentType<T> dt, SourceSystem ss); static Map<String, Object> getNbaMetadata();  }