diff --git a/catalog-rest-service/src/main/resources/ui/src/components/common/error-with-placeholder/ErrorPlaceHolderES.tsx b/catalog-rest-service/src/main/resources/ui/src/components/common/error-with-placeholder/ErrorPlaceHolderES.tsx
index 01f60848da0..d55e32ea25c 100644
--- a/catalog-rest-service/src/main/resources/ui/src/components/common/error-with-placeholder/ErrorPlaceHolderES.tsx
+++ b/catalog-rest-service/src/main/resources/ui/src/components/common/error-with-placeholder/ErrorPlaceHolderES.tsx
@@ -4,9 +4,10 @@ import NoDataFoundPlaceHolder from '../../../assets/img/no-data-placeholder.png'
type Props = {
type: 'error' | 'noData';
+ errorMessage?: string;
};
-const ErrorPlaceHolderES = ({ type }: Props) => {
+const ErrorPlaceHolderES = ({ type, errorMessage }: Props) => {
const noRecordForES = () => {
return (
<>
@@ -36,6 +37,30 @@ const ErrorPlaceHolderES = ({ type }: Props) => {
);
};
+ const elasticSearchError = () => {
+ const index = errorMessage?.split('[')[3]?.split(']')[0];
+
+ return errorMessage && index ? (
+
+ OpenMetadata requires index
+
+ {index}
+ {' '}
+ to exist while running Elasticsearch. Please check your Elasticsearch
+ indexes
+
+ ) : (
+
+ OpenMetadata requires Elasticsearch 7+ running and configured in
+
+ openmetadata.yaml.
+
+ Please check the configuration and make sure the Elasticsearch is
+ running.
+
+ );
+ };
+
return (
<>
@@ -49,16 +74,7 @@ const ErrorPlaceHolderES = ({ type }: Props) => {
}!`}
{type === 'noData' && noRecordForES()}
- {type === 'error' && (
-
- OpenMetadata requires Elasticsearch 7+ running and configured in
-
- openmetadata.yaml.
-
- Please check the configuration and make sure the Elasticsearch is
- running.
-
- )}
+ {type === 'error' && elasticSearchError()}
>
);
diff --git a/catalog-rest-service/src/main/resources/ui/src/pages/explore/index.tsx b/catalog-rest-service/src/main/resources/ui/src/pages/explore/index.tsx
index 250fdc2579d..b89f4af362a 100644
--- a/catalog-rest-service/src/main/resources/ui/src/pages/explore/index.tsx
+++ b/catalog-rest-service/src/main/resources/ui/src/pages/explore/index.tsx
@@ -33,7 +33,6 @@ import FacetFilter from '../../components/common/facetfilter/FacetFilter';
import DropDownList from '../../components/dropdown/DropDownList';
import SearchedData from '../../components/searched-data/SearchedData';
import {
- ERROR404,
ERROR500,
PAGE_SIZE,
tableSortingFields,
@@ -214,7 +213,7 @@ const ExplorePage: React.FC = (): React.ReactElement => {
setDashboardCount(dashboard.data.hits.total.value);
})
.catch((err: AxiosError) => {
- setError(ERROR404);
+ setError(err.response?.data?.responseMessage);
showToast({
variant: 'error',
body: err.response?.data?.responseMessage ?? ERROR500,
@@ -297,7 +296,7 @@ const ExplorePage: React.FC = (): React.ReactElement => {
}
)
.catch((err: AxiosError) => {
- setError(ERROR404);
+ setError(err.response?.data?.responseMessage);
showToast({
variant: 'error',
body: err.response?.data?.responseMessage ?? ERROR500,
@@ -478,7 +477,7 @@ const ExplorePage: React.FC = (): React.ReactElement => {
return (
<>
{error ? (
-
+
) : (
{
const [currentTab, setCurrentTab] = useState(1);
const [error, setError] = useState('');
const [filter, setFilter] = useState('');
+ const [searchIndex] = useState(
+ 'dashboard_search_index,topic_search_index,table_search_index'
+ );
const [countServices, setCountServices] = useState(0);
const [countAssets, setCountAssets] = useState(0);
const isMounted = useRef(false);
@@ -65,7 +68,15 @@ const MyDataPage: React.FC = (): React.ReactElement => {
const fetchTableData = (setAssetCount = false) => {
setIsLoading(true);
- searchData('', currentPage, PAGE_SIZE, filter ? getFilters() : '')
+ searchData(
+ '',
+ currentPage,
+ PAGE_SIZE,
+ filter ? getFilters() : '',
+ '',
+ '',
+ searchIndex
+ )
.then((res: SearchResponse) => {
const hits = res.data.hits.hits;
const total = res.data.hits.total.value;
@@ -83,12 +94,11 @@ const MyDataPage: React.FC = (): React.ReactElement => {
}
})
.catch((err: AxiosError) => {
- setError(ERROR404);
+ setError(err.response?.data?.responseMessage);
showToast({
variant: 'error',
body: err.response?.data?.responseMessage ?? ERROR500,
});
-
setIsLoading(false);
});
};
@@ -151,7 +161,7 @@ const MyDataPage: React.FC = (): React.ReactElement => {
) : (
<>
{error ? (
-
+
) : (