Package org.openmetadata.service.search
Class IndexUtil
- java.lang.Object
-
- org.openmetadata.service.search.IndexUtil
-
public class IndexUtil extends Object
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classIndexUtil.ElasticSearchIndexStatus
-
Field Summary
Fields Modifier and Type Field Description static StringELASTIC_SEARCH_ENTITY_FQN_STREAMstatic StringELASTIC_SEARCH_EXTENSIONstatic StringENTITY_REPORT_DATAstatic Map<String,String>ENTITY_TYPE_TO_INDEX_MAPstatic StringMAPPINGS_KEYstatic StringPROPERTIES_KEYstatic StringREASON_TRACEstatic StringWEB_ANALYTIC_ENTITY_VIEW_REPORT_DATAstatic StringWEB_ANALYTIC_USER_ACTIVITY_REPORT_DATA
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static SSLContextcreateElasticSearchSSLContext(ElasticSearchConfiguration elasticSearchConfiguration)static StringgetContext(String type, String info)static Set<String>getIndexFields(String entityType, IndexMappingLanguage lang)static StringgetIndexMapping(SearchIndexDefinition.ElasticSearchIndexType elasticSearchIndexType, String lang)static SearchIndexDefinition.ElasticSearchIndexTypegetIndexMappingByEntityType(String type)static SearchClientgetSearchClient(ElasticSearchConfiguration esConfig, CollectionDAO dao)static voidpopulateEsFieldsForIndexes(SearchIndexDefinition.ElasticSearchIndexType elasticSearchIndexType, IndexMappingLanguage lang)This method is used lazily to populate ES Mapping fields and corresponding Entity Fields getting common fields in between NOTE: This is not done as part of constructor since Resource Using this might start to get exception since it utilizes EntityRepository.
-
-
-
Field Detail
-
ELASTIC_SEARCH_EXTENSION
public static final String ELASTIC_SEARCH_EXTENSION
- See Also:
- Constant Field Values
-
ELASTIC_SEARCH_ENTITY_FQN_STREAM
public static final String ELASTIC_SEARCH_ENTITY_FQN_STREAM
- See Also:
- Constant Field Values
-
MAPPINGS_KEY
public static final String MAPPINGS_KEY
- See Also:
- Constant Field Values
-
PROPERTIES_KEY
public static final String PROPERTIES_KEY
- See Also:
- Constant Field Values
-
REASON_TRACE
public static final String REASON_TRACE
- See Also:
- Constant Field Values
-
ENTITY_REPORT_DATA
public static final String ENTITY_REPORT_DATA
- See Also:
- Constant Field Values
-
WEB_ANALYTIC_ENTITY_VIEW_REPORT_DATA
public static final String WEB_ANALYTIC_ENTITY_VIEW_REPORT_DATA
- See Also:
- Constant Field Values
-
WEB_ANALYTIC_USER_ACTIVITY_REPORT_DATA
public static final String WEB_ANALYTIC_USER_ACTIVITY_REPORT_DATA
- See Also:
- Constant Field Values
-
-
Method Detail
-
getSearchClient
public static SearchClient getSearchClient(ElasticSearchConfiguration esConfig, CollectionDAO dao)
-
populateEsFieldsForIndexes
public static void populateEsFieldsForIndexes(SearchIndexDefinition.ElasticSearchIndexType elasticSearchIndexType, IndexMappingLanguage lang)
This method is used lazily to populate ES Mapping fields and corresponding Entity Fields getting common fields in between NOTE: This is not done as part of constructor since Resource Using this might start to get exception since it utilizes EntityRepository.
-
getIndexMappingByEntityType
public static SearchIndexDefinition.ElasticSearchIndexType getIndexMappingByEntityType(String type)
-
getIndexFields
public static Set<String> getIndexFields(String entityType, IndexMappingLanguage lang)
-
getIndexMapping
public static String getIndexMapping(SearchIndexDefinition.ElasticSearchIndexType elasticSearchIndexType, String lang) throws IOException
- Throws:
IOException
-
createElasticSearchSSLContext
public static SSLContext createElasticSearchSSLContext(ElasticSearchConfiguration elasticSearchConfiguration) throws KeyStoreException
- Throws:
KeyStoreException
-
-