|
|
@ -166,8 +166,8 @@ func RemoveMetadata(id string) (bool, string, error) {
|
|
|
|
func CreateMetadataES(indexName string) (bool, string, error) {
|
|
|
|
func CreateMetadataES(indexName string) (bool, string, error) {
|
|
|
|
res, _, datasourceId, _ := DatasourceDAO.GetDatasourceIdByCode(indexName)
|
|
|
|
res, _, datasourceId, _ := DatasourceDAO.GetDatasourceIdByCode(indexName)
|
|
|
|
if res == true {
|
|
|
|
if res == true {
|
|
|
|
if MetadataDAO.IsMetadataExistsByDatasourceCode(datasourceId.(string)) == true {
|
|
|
|
if MetadataDAO.IsMetadataExistsByDatasourceCode(indexName) == true {
|
|
|
|
MetadataDAO.DeleteMetadataByDatasourceCode(datasourceId.(string))
|
|
|
|
MetadataDAO.DeleteMetadataByDatasourceCode(indexName)
|
|
|
|
}
|
|
|
|
}
|
|
|
|
fmt.Println("datasourceId: ", datasourceId)
|
|
|
|
fmt.Println("datasourceId: ", datasourceId)
|
|
|
|
result := ES7Util.IndexDataContentMapping(indexName)
|
|
|
|
result := ES7Util.IndexDataContentMapping(indexName)
|
|
|
|