Package org.openmetadata.service.search
Interface SearchClient
-
- All Known Implementing Classes:
ElasticSearchClientImpl,OpenSearchClientImpl
public interface SearchClient
-
-
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description voidaddTestCaseFromLogicalTestSuite(TestSuite testSuite, ChangeEvent event, SearchIndexDefinition.ElasticSearchIndexType indexType)javax.ws.rs.core.Responseaggregate(String index, String fieldName, String value, String query)default org.elasticsearch.action.update.UpdateRequestapplyESChangeEvent(ChangeEvent event)default org.opensearch.action.update.UpdateRequestapplyOSChangeEvent(ChangeEvent event)default org.elasticsearch.action.bulk.BulkResponsebulk(org.elasticsearch.action.bulk.BulkRequest data, org.elasticsearch.client.RequestOptions options)default org.opensearch.action.bulk.BulkResponsebulk(org.opensearch.action.bulk.BulkRequest data, org.opensearch.client.RequestOptions options)voidclose()booleancreateIndex(SearchIndexDefinition.ElasticSearchIndexType elasticSearchIndexType, String lang)voiddeleteIndex(SearchIndexDefinition.ElasticSearchIndexType elasticSearchIndexType)CollectionDAOgetDao()default StringgetIndexMapping(SearchIndexDefinition.ElasticSearchIndexType elasticSearchIndexType, String lang)default voidgetScriptWithParams(ChangeEvent event, String script, Map<String,Object> fieldParams)ElasticSearchConfiguration.SearchTypegetSearchType()TreeMap<Long,List<Object>>getSortedDate(String team, Long scheduleTime, Long currentTime, DataInsightChartResult.DataInsightChartType chartType, String indexName)default intgetSuccessFromBulkResponse(org.elasticsearch.action.bulk.BulkResponse response)default intgetSuccessFromBulkResponse(org.opensearch.action.bulk.BulkResponse response)javax.ws.rs.core.ResponselistDataInsightChartResult(Long startTs, Long endTs, String tier, String team, DataInsightChartResult.DataInsightChartType dataInsightChartName, String dataReportIndex)voidprocessTestCase(TestCase testCase, ChangeEvent event, SearchIndexDefinition.ElasticSearchIndexType indexType)javax.ws.rs.core.Responsesearch(SearchRequest request)javax.ws.rs.core.ResponsesearchBySourceUrl(String sourceUrl)javax.ws.rs.core.Responsesuggest(SearchRequest request)voidupdateClassification(ChangeEvent event)voidupdateDashboardService(ChangeEvent event)voidupdateDatabase(ChangeEvent event)voidupdateDatabaseSchema(ChangeEvent event)voidupdateDatabaseService(ChangeEvent event)default voidupdateElasticSearch(org.elasticsearch.action.update.UpdateRequest updateRequest)default voidupdateElasticSearch(org.opensearch.action.update.UpdateRequest updateRequest)default voidupdateElasticSearchFailureStatus(String failedFor, String failureMessage)voidupdateEntity(ChangeEvent event)voidupdateGlossary(ChangeEvent event)voidupdateGlossaryTerm(ChangeEvent event)voidupdateIndex(SearchIndexDefinition.ElasticSearchIndexType elasticSearchIndexType, String lang)voidupdateMessagingService(ChangeEvent event)voidupdateMlModelService(ChangeEvent event)voidupdatePipelineService(ChangeEvent event)default voidupdateSearchForEntityCreated(SearchIndexDefinition.ElasticSearchIndexType indexType, String entityType, ChangeEvent event)default voidupdateSearchForEntityUpdated(SearchIndexDefinition.ElasticSearchIndexType indexType, String entityType, ChangeEvent event)voidupdateStorageService(ChangeEvent event)voidupdateTag(ChangeEvent event)voidupdateTeam(ChangeEvent event)default voidupdateTestCase(ChangeEvent event)voidupdateTestSuite(ChangeEvent event)voidupdateUser(ChangeEvent event)
-
-
-
Method Detail
-
createIndex
boolean createIndex(SearchIndexDefinition.ElasticSearchIndexType elasticSearchIndexType, String lang)
-
updateIndex
void updateIndex(SearchIndexDefinition.ElasticSearchIndexType elasticSearchIndexType, String lang)
-
deleteIndex
void deleteIndex(SearchIndexDefinition.ElasticSearchIndexType elasticSearchIndexType)
-
search
javax.ws.rs.core.Response search(SearchRequest request) throws IOException
- Throws:
IOException
-
searchBySourceUrl
javax.ws.rs.core.Response searchBySourceUrl(String sourceUrl) throws IOException
- Throws:
IOException
-
aggregate
javax.ws.rs.core.Response aggregate(String index, String fieldName, String value, String query) throws IOException
- Throws:
IOException
-
suggest
javax.ws.rs.core.Response suggest(SearchRequest request) throws IOException
- Throws:
IOException
-
getSearchType
ElasticSearchConfiguration.SearchType getSearchType()
-
applyOSChangeEvent
default org.opensearch.action.update.UpdateRequest applyOSChangeEvent(ChangeEvent event)
-
applyESChangeEvent
default org.elasticsearch.action.update.UpdateRequest applyESChangeEvent(ChangeEvent event)
-
updateElasticSearch
default void updateElasticSearch(org.opensearch.action.update.UpdateRequest updateRequest) throws IOException- Throws:
IOException
-
updateElasticSearch
default void updateElasticSearch(org.elasticsearch.action.update.UpdateRequest updateRequest) throws IOException- Throws:
IOException
-
updateSearchForEntityCreated
default void updateSearchForEntityCreated(SearchIndexDefinition.ElasticSearchIndexType indexType, String entityType, ChangeEvent event) throws IOException
- Throws:
IOException
-
updateSearchForEntityUpdated
default void updateSearchForEntityUpdated(SearchIndexDefinition.ElasticSearchIndexType indexType, String entityType, ChangeEvent event) throws IOException
- Throws:
IOException
-
updateEntity
void updateEntity(ChangeEvent event) throws IOException
- Throws:
IOException
-
updateUser
void updateUser(ChangeEvent event) throws IOException
- Throws:
IOException
-
updateTeam
void updateTeam(ChangeEvent event) throws IOException
- Throws:
IOException
-
updateGlossaryTerm
void updateGlossaryTerm(ChangeEvent event) throws IOException
- Throws:
IOException
-
updateGlossary
void updateGlossary(ChangeEvent event) throws IOException
- Throws:
IOException
-
updateTag
void updateTag(ChangeEvent event) throws IOException
- Throws:
IOException
-
updateDatabase
void updateDatabase(ChangeEvent event) throws IOException
- Throws:
IOException
-
updateDatabaseSchema
void updateDatabaseSchema(ChangeEvent event) throws IOException
- Throws:
IOException
-
updateDatabaseService
void updateDatabaseService(ChangeEvent event) throws IOException
- Throws:
IOException
-
updatePipelineService
void updatePipelineService(ChangeEvent event) throws IOException
- Throws:
IOException
-
updateMlModelService
void updateMlModelService(ChangeEvent event) throws IOException
- Throws:
IOException
-
updateStorageService
void updateStorageService(ChangeEvent event) throws IOException
- Throws:
IOException
-
updateMessagingService
void updateMessagingService(ChangeEvent event) throws IOException
- Throws:
IOException
-
updateDashboardService
void updateDashboardService(ChangeEvent event) throws IOException
- Throws:
IOException
-
updateClassification
void updateClassification(ChangeEvent event) throws IOException
- Throws:
IOException
-
updateTestCase
default void updateTestCase(ChangeEvent event) throws IOException
- Throws:
IOException
-
updateTestSuite
void updateTestSuite(ChangeEvent event) throws IOException
- Throws:
IOException
-
processTestCase
void processTestCase(TestCase testCase, ChangeEvent event, SearchIndexDefinition.ElasticSearchIndexType indexType) throws IOException
- Throws:
IOException
-
addTestCaseFromLogicalTestSuite
void addTestCaseFromLogicalTestSuite(TestSuite testSuite, ChangeEvent event, SearchIndexDefinition.ElasticSearchIndexType indexType) throws IOException
- Throws:
IOException
-
close
void close()
-
bulk
default org.opensearch.action.bulk.BulkResponse bulk(org.opensearch.action.bulk.BulkRequest data, org.opensearch.client.RequestOptions options) throws IOException- Throws:
IOException
-
bulk
default org.elasticsearch.action.bulk.BulkResponse bulk(org.elasticsearch.action.bulk.BulkRequest data, org.elasticsearch.client.RequestOptions options) throws IOException- Throws:
IOException
-
getSuccessFromBulkResponse
default int getSuccessFromBulkResponse(org.opensearch.action.bulk.BulkResponse response)
-
getSuccessFromBulkResponse
default int getSuccessFromBulkResponse(org.elasticsearch.action.bulk.BulkResponse response)
-
getSortedDate
TreeMap<Long,List<Object>> getSortedDate(String team, Long scheduleTime, Long currentTime, DataInsightChartResult.DataInsightChartType chartType, String indexName) throws IOException, ParseException
- Throws:
IOExceptionParseException
-
listDataInsightChartResult
javax.ws.rs.core.Response listDataInsightChartResult(Long startTs, Long endTs, String tier, String team, DataInsightChartResult.DataInsightChartType dataInsightChartName, String dataReportIndex) throws IOException, ParseException
- Throws:
IOExceptionParseException
-
getScriptWithParams
default void getScriptWithParams(ChangeEvent event, String script, Map<String,Object> fieldParams)
-
getIndexMapping
default String getIndexMapping(SearchIndexDefinition.ElasticSearchIndexType elasticSearchIndexType, String lang) throws IOException
- Throws:
IOException
-
getDao
CollectionDAO getDao()
-
-