mirror of
				https://github.com/open-metadata/OpenMetadata.git
				synced 2025-11-03 20:19:31 +00:00 
			
		
		
		
	* Minor: fix entityType aggregation (#14284) * fix: add entity type filter * add change on opensearchclient as well --------- Co-authored-by: karanh37 <karanh37@gmail.com> Co-authored-by: 07Himank <himank07mehta@gmail.com>
This commit is contained in:
		
							parent
							
								
									157dcd5f25
								
							
						
					
					
						commit
						a7fddc7fec
					
				@ -895,8 +895,7 @@ public class ElasticSearchClient implements SearchClient {
 | 
			
		||||
            AggregationBuilders.terms("service.displayName.keyword")
 | 
			
		||||
                .field("service.displayName.keyword")
 | 
			
		||||
                .size(MAX_AGGREGATE_SIZE))
 | 
			
		||||
        .aggregation(
 | 
			
		||||
            AggregationBuilders.terms("entityType.keyword").field("entityType.keyword").size(MAX_AGGREGATE_SIZE))
 | 
			
		||||
        .aggregation(AggregationBuilders.terms("entityType").field("entityType").size(MAX_AGGREGATE_SIZE))
 | 
			
		||||
        .aggregation(AggregationBuilders.terms("tier.tagFQN").field("tier.tagFQN").size(MAX_AGGREGATE_SIZE))
 | 
			
		||||
        .aggregation(
 | 
			
		||||
            AggregationBuilders.terms(OWNER_DISPLAY_NAME_KEYWORD)
 | 
			
		||||
 | 
			
		||||
@ -883,8 +883,7 @@ public class OpenSearchClient implements SearchClient {
 | 
			
		||||
            AggregationBuilders.terms("service.displayName.keyword")
 | 
			
		||||
                .field("service.displayName.keyword")
 | 
			
		||||
                .size(MAX_AGGREGATE_SIZE))
 | 
			
		||||
        .aggregation(
 | 
			
		||||
            AggregationBuilders.terms("entityType.keyword").field("entityType.keyword").size(MAX_AGGREGATE_SIZE))
 | 
			
		||||
        .aggregation(AggregationBuilders.terms("entityType").field("entityType").size(MAX_AGGREGATE_SIZE))
 | 
			
		||||
        .aggregation(AggregationBuilders.terms("tier.tagFQN").field("tier.tagFQN").size(MAX_AGGREGATE_SIZE))
 | 
			
		||||
        .aggregation(
 | 
			
		||||
            AggregationBuilders.terms(OWNER_DISPLAY_NAME_KEYWORD)
 | 
			
		||||
 | 
			
		||||
@ -417,6 +417,9 @@
 | 
			
		||||
      "status": {
 | 
			
		||||
        "type": "text"
 | 
			
		||||
      },
 | 
			
		||||
      "entityType": {
 | 
			
		||||
        "type": "keyword"
 | 
			
		||||
      },
 | 
			
		||||
      "suggest": {
 | 
			
		||||
        "type": "completion",
 | 
			
		||||
        "contexts": [
 | 
			
		||||
 | 
			
		||||
@ -201,6 +201,9 @@
 | 
			
		||||
      },
 | 
			
		||||
      "provider" : {
 | 
			
		||||
        "type": "text"
 | 
			
		||||
      },
 | 
			
		||||
      "entityType": {
 | 
			
		||||
        "type": "keyword"
 | 
			
		||||
      }
 | 
			
		||||
    }
 | 
			
		||||
  }
 | 
			
		||||
 | 
			
		||||
@ -100,6 +100,9 @@
 | 
			
		||||
      "disabled": {
 | 
			
		||||
        "type": "text"
 | 
			
		||||
      },
 | 
			
		||||
      "entityType": {
 | 
			
		||||
        "type": "keyword"
 | 
			
		||||
      },
 | 
			
		||||
      "classification": {
 | 
			
		||||
        "properties": {
 | 
			
		||||
          "id": {
 | 
			
		||||
 | 
			
		||||
@ -396,6 +396,9 @@
 | 
			
		||||
      "status": {
 | 
			
		||||
        "type": "text"
 | 
			
		||||
      },
 | 
			
		||||
      "entityType": {
 | 
			
		||||
        "type": "keyword"
 | 
			
		||||
      },
 | 
			
		||||
      "suggest": {
 | 
			
		||||
        "type": "completion",
 | 
			
		||||
        "contexts": [
 | 
			
		||||
 | 
			
		||||
@ -211,6 +211,9 @@
 | 
			
		||||
      },
 | 
			
		||||
      "provider" : {
 | 
			
		||||
        "type": "text"
 | 
			
		||||
      },
 | 
			
		||||
      "entityType": {
 | 
			
		||||
        "type": "keyword"
 | 
			
		||||
      }
 | 
			
		||||
    }
 | 
			
		||||
  }
 | 
			
		||||
 | 
			
		||||
@ -145,6 +145,9 @@
 | 
			
		||||
              "path": "deleted"
 | 
			
		||||
            }
 | 
			
		||||
          ]
 | 
			
		||||
      },
 | 
			
		||||
      "entityType": {
 | 
			
		||||
        "type": "keyword"
 | 
			
		||||
      }
 | 
			
		||||
    }
 | 
			
		||||
  }
 | 
			
		||||
 | 
			
		||||
@ -324,6 +324,9 @@
 | 
			
		||||
      "usageCount": {
 | 
			
		||||
        "type": "integer"
 | 
			
		||||
      },
 | 
			
		||||
      "entityType": {
 | 
			
		||||
        "type": "keyword"
 | 
			
		||||
      },
 | 
			
		||||
      "tags": {
 | 
			
		||||
        "properties": {
 | 
			
		||||
          "tagFQN": {
 | 
			
		||||
 | 
			
		||||
@ -188,6 +188,9 @@
 | 
			
		||||
      },
 | 
			
		||||
      "provider" : {
 | 
			
		||||
        "type": "text"
 | 
			
		||||
      },
 | 
			
		||||
      "entityType": {
 | 
			
		||||
        "type": "keyword"
 | 
			
		||||
      }
 | 
			
		||||
    }
 | 
			
		||||
  }
 | 
			
		||||
 | 
			
		||||
@ -143,6 +143,9 @@
 | 
			
		||||
            "path": "deleted"
 | 
			
		||||
          }
 | 
			
		||||
        ]
 | 
			
		||||
      },
 | 
			
		||||
      "entityType": {
 | 
			
		||||
        "type": "keyword"
 | 
			
		||||
      }
 | 
			
		||||
    }
 | 
			
		||||
  }
 | 
			
		||||
 | 
			
		||||
@ -363,11 +363,13 @@ export const AssetSelectionModal = ({
 | 
			
		||||
            searchText: search,
 | 
			
		||||
            page: pageNumber + 1,
 | 
			
		||||
            index: activeFilter,
 | 
			
		||||
            updatedQueryFilter,
 | 
			
		||||
          });
 | 
			
		||||
      }
 | 
			
		||||
    },
 | 
			
		||||
    [
 | 
			
		||||
      pageNumber,
 | 
			
		||||
      updatedQueryFilter,
 | 
			
		||||
      activeFilter,
 | 
			
		||||
      search,
 | 
			
		||||
      totalCount,
 | 
			
		||||
 | 
			
		||||
@ -172,6 +172,45 @@ export const DATA_PRODUCT_DROPDOWN_ITEMS = [
 | 
			
		||||
];
 | 
			
		||||
 | 
			
		||||
export const DOMAIN_DATAPRODUCT_DROPDOWN_ITEMS = [
 | 
			
		||||
  {
 | 
			
		||||
    label: t('label.entity-type-plural', {
 | 
			
		||||
      entity: t('label.entity'),
 | 
			
		||||
    }) as string,
 | 
			
		||||
    key: 'entityType',
 | 
			
		||||
  },
 | 
			
		||||
  {
 | 
			
		||||
    label: t('label.owner'),
 | 
			
		||||
    key: 'owner.displayName.keyword',
 | 
			
		||||
  },
 | 
			
		||||
  {
 | 
			
		||||
    label: t('label.tag'),
 | 
			
		||||
    key: 'tags.tagFQN',
 | 
			
		||||
  },
 | 
			
		||||
  {
 | 
			
		||||
    label: t('label.tier'),
 | 
			
		||||
    key: 'tier.tagFQN',
 | 
			
		||||
  },
 | 
			
		||||
  {
 | 
			
		||||
    label: t('label.service'),
 | 
			
		||||
    key: 'service.displayName.keyword',
 | 
			
		||||
  },
 | 
			
		||||
  {
 | 
			
		||||
    label: t('label.service-type'),
 | 
			
		||||
    key: 'serviceType',
 | 
			
		||||
  },
 | 
			
		||||
];
 | 
			
		||||
 | 
			
		||||
export const GLOSSARY_ASSETS_DROPDOWN_ITEMS = [
 | 
			
		||||
  {
 | 
			
		||||
    label: t('label.entity-type-plural', {
 | 
			
		||||
      entity: t('label.entity'),
 | 
			
		||||
    }) as string,
 | 
			
		||||
    key: 'entityType',
 | 
			
		||||
  },
 | 
			
		||||
  {
 | 
			
		||||
    label: t('label.domain'),
 | 
			
		||||
    key: 'domain.displayName.keyword',
 | 
			
		||||
  },
 | 
			
		||||
  {
 | 
			
		||||
    label: t('label.owner'),
 | 
			
		||||
    key: 'owner.displayName.keyword',
 | 
			
		||||
 | 
			
		||||
@ -1364,9 +1364,9 @@
 | 
			
		||||
    "find-in-table": "In Tabelle suchen",
 | 
			
		||||
    "fosters-collaboration-among-producers-and-consumers": "Setzen Sie Unternehmensziele und KPIs, um die Datenkultur Ihres Unternehmens proaktiv voranzutreiben. Fördern Sie eine Kultur kontinuierlicher Verbesserung mit rechtzeitigen Berichten zur Überwachung der Datenqualität.",
 | 
			
		||||
    "get-started-with-open-metadata": "Erste Schritte mit OpenMetadata",
 | 
			
		||||
    "glossary-tag-assignement-help-message": "You can either remove this assets or remove conflicting tag from the asset and try again adding tags!",
 | 
			
		||||
    "glossary-tag-assignement-help-message": "You can either remove these assets or remove the conflicting tags from the assets, and try adding the tags again.",
 | 
			
		||||
    "glossary-tag-update-description": "This action will apply the tag to all Assets linked to the Glossary Term",
 | 
			
		||||
    "glossary-tag-update-modal-title": "Validation failed for following assets",
 | 
			
		||||
    "glossary-tag-update-modal-title": "Validation failed for the following data assets",
 | 
			
		||||
    "glossary-term-description": "Jeder Begriff im Glossar hat eine eindeutige Definition. Neben der Definition des Standardbegriffs für ein Konzept können auch Synonyme sowie verwandte Begriffe (z. B. übergeordnete und untergeordnete Begriffe) angegeben werden. Es können Referenzen zu den Assets hinzugefügt werden, die sich auf die Begriffe beziehen. Neue Begriffe können dem Glossar hinzugefügt oder aktualisiert werden. Die Glossarbegriffe können von bestimmten Benutzern überprüft werden, die die Begriffe akzeptieren oder ablehnen können.",
 | 
			
		||||
    "glossary-term-status": "Glossary Term was {{status}}.",
 | 
			
		||||
    "go-back-to-login-page": "Zurück zur Anmeldeseite",
 | 
			
		||||
 | 
			
		||||
@ -1364,9 +1364,9 @@
 | 
			
		||||
    "find-in-table": "Find in table",
 | 
			
		||||
    "fosters-collaboration-among-producers-and-consumers": "Set organizational goals and KPIs to proactively drive the data culture of your company. Foster a culture of continuous improvement with timely reports to monitor data health.",
 | 
			
		||||
    "get-started-with-open-metadata": "Get started with OpenMetadata",
 | 
			
		||||
    "glossary-tag-assignement-help-message": "You can either remove this assets or remove conflicting tag from the asset and try again adding tags!",
 | 
			
		||||
    "glossary-tag-assignement-help-message": "You can either remove these assets or remove the conflicting tags from the assets, and try adding the tags again.",
 | 
			
		||||
    "glossary-tag-update-description": "This action will apply the tag to all Assets linked to the Glossary Term",
 | 
			
		||||
    "glossary-tag-update-modal-title": "Validation failed for following assets",
 | 
			
		||||
    "glossary-tag-update-modal-title": "Validation failed for the following data assets",
 | 
			
		||||
    "glossary-term-description": "Every term in the glossary has a unique definition. Along with defining the standard term for a concept, the synonyms as well as related terms (for e.g., parent and child terms) can be specified. References can be added to the assets related to the terms. New terms can be added or updated to the Glossary. The glossary terms can be reviewed by certain users, who can accept or reject the terms.",
 | 
			
		||||
    "glossary-term-status": "Glossary Term was {{status}}.",
 | 
			
		||||
    "go-back-to-login-page": "Go back to Login page",
 | 
			
		||||
 | 
			
		||||
@ -1364,9 +1364,9 @@
 | 
			
		||||
    "find-in-table": "Buscar en la tabla",
 | 
			
		||||
    "fosters-collaboration-among-producers-and-consumers": "Fomenta la colaboración entre los productores y consumidores de datos.",
 | 
			
		||||
    "get-started-with-open-metadata": "Empezar con OpenMetadata",
 | 
			
		||||
    "glossary-tag-assignement-help-message": "You can either remove this assets or remove conflicting tag from the asset and try again adding tags!",
 | 
			
		||||
    "glossary-tag-assignement-help-message": "You can either remove these assets or remove the conflicting tags from the assets, and try adding the tags again.",
 | 
			
		||||
    "glossary-tag-update-description": "This action will apply the tag to all Assets linked to the Glossary Term",
 | 
			
		||||
    "glossary-tag-update-modal-title": "Validation failed for following assets",
 | 
			
		||||
    "glossary-tag-update-modal-title": "Validation failed for the following data assets",
 | 
			
		||||
    "glossary-term-description": "Cada término en el glosario tiene una definición única. Además de definir el término estándar para un concepto, se pueden especificar sinónimos y términos relacionados (por ejemplo, términos padre e hijo). Se pueden agregar referencias a los activos relacionados con los términos. Se pueden agregar o actualizar nuevos términos al glosario. Los términos del glosario pueden ser revisados por ciertos usuarios, quienes pueden aceptar o rechazar los términos.",
 | 
			
		||||
    "glossary-term-status": "Glossary Term was {{status}}.",
 | 
			
		||||
    "go-back-to-login-page": "Volver a la página de inicio de sesión",
 | 
			
		||||
 | 
			
		||||
@ -1364,9 +1364,9 @@
 | 
			
		||||
    "find-in-table": "Trouver dans la table",
 | 
			
		||||
    "fosters-collaboration-among-producers-and-consumers": "Encouragez la collaborations entre les consommateurs et producteurs de données",
 | 
			
		||||
    "get-started-with-open-metadata": "Commencez votre Journée avec OpenMetadata",
 | 
			
		||||
    "glossary-tag-assignement-help-message": "You can either remove this assets or remove conflicting tag from the asset and try again adding tags!",
 | 
			
		||||
    "glossary-tag-assignement-help-message": "You can either remove these assets or remove the conflicting tags from the assets, and try adding the tags again.",
 | 
			
		||||
    "glossary-tag-update-description": "This action will apply the tag to all Assets linked to the Glossary Term",
 | 
			
		||||
    "glossary-tag-update-modal-title": "Validation failed for following assets",
 | 
			
		||||
    "glossary-tag-update-modal-title": "Validation failed for the following data assets",
 | 
			
		||||
    "glossary-term-description": "Chaque terme du glossaire a une définition unique. En plus de définir le terme standard pour un concept, les synonymes ainsi que les termes associés (par exemple, les termes parent et enfant) peuvent être spécifiés. Des références peuvent être ajoutées aux actifs liés aux termes. De nouveaux termes peuvent être ajoutés ou mis à jour dans le glossaire. Les termes du glossaire peuvent être examinés par certains utilisateurs, qui peuvent accepter ou rejeter les termes.",
 | 
			
		||||
    "glossary-term-status": "Glossary Term was {{status}}.",
 | 
			
		||||
    "go-back-to-login-page": "Retour à la page d'accueil",
 | 
			
		||||
 | 
			
		||||
@ -1364,9 +1364,9 @@
 | 
			
		||||
    "find-in-table": "テーブルで探す",
 | 
			
		||||
    "fosters-collaboration-among-producers-and-consumers": "Fosters collaboration among the producers and consumers of data.",
 | 
			
		||||
    "get-started-with-open-metadata": "Get started with OpenMetadata",
 | 
			
		||||
    "glossary-tag-assignement-help-message": "You can either remove this assets or remove conflicting tag from the asset and try again adding tags!",
 | 
			
		||||
    "glossary-tag-assignement-help-message": "You can either remove these assets or remove the conflicting tags from the assets, and try adding the tags again.",
 | 
			
		||||
    "glossary-tag-update-description": "This action will apply the tag to all Assets linked to the Glossary Term",
 | 
			
		||||
    "glossary-tag-update-modal-title": "Validation failed for following assets",
 | 
			
		||||
    "glossary-tag-update-modal-title": "Validation failed for the following data assets",
 | 
			
		||||
    "glossary-term-description": "Every term in the glossary has a unique definition. Along with defining the standard term for a concept, the synonyms as well as related terms (for e.g., parent and child terms) can be specified. References can be added to the assets related to the terms. New terms can be added or updated to the Glossary. The glossary terms can be reviewed by certain users, who can accept or reject the terms.",
 | 
			
		||||
    "glossary-term-status": "Glossary Term was {{status}}.",
 | 
			
		||||
    "go-back-to-login-page": "ログインページに戻る",
 | 
			
		||||
 | 
			
		||||
@ -1364,9 +1364,9 @@
 | 
			
		||||
    "find-in-table": "Encontrar na tabela",
 | 
			
		||||
    "fosters-collaboration-among-producers-and-consumers": "Estabeleça metas organizacionais e KPIs para impulsionar proativamente a cultura de dados da sua empresa. Fomente uma cultura de melhoria contínua com relatórios oportunos para monitorar a saúde dos dados.",
 | 
			
		||||
    "get-started-with-open-metadata": "Comece com o OpenMetadata",
 | 
			
		||||
    "glossary-tag-assignement-help-message": "You can either remove this assets or remove conflicting tag from the asset and try again adding tags!",
 | 
			
		||||
    "glossary-tag-assignement-help-message": "You can either remove these assets or remove the conflicting tags from the assets, and try adding the tags again.",
 | 
			
		||||
    "glossary-tag-update-description": "This action will apply the tag to all Assets linked to the Glossary Term",
 | 
			
		||||
    "glossary-tag-update-modal-title": "Validation failed for following assets",
 | 
			
		||||
    "glossary-tag-update-modal-title": "Validation failed for the following data assets",
 | 
			
		||||
    "glossary-term-description": "Cada termo no glossário tem uma definição única. Além de definir o termo padrão para um conceito, os sinônimos e termos relacionados (por exemplo, termos pai e filho) podem ser especificados. Referências podem ser adicionadas aos ativos relacionados aos termos. Novos termos podem ser adicionados ou atualizados no Glossário. Os termos do glossário podem ser revisados por certos usuários, que podem aceitar ou rejeitar os termos.",
 | 
			
		||||
    "glossary-term-status": "Termo do Glossário foi {{status}}.",
 | 
			
		||||
    "go-back-to-login-page": "Voltar para a página de Login",
 | 
			
		||||
 | 
			
		||||
@ -1364,9 +1364,9 @@
 | 
			
		||||
    "find-in-table": "Найти в таблице",
 | 
			
		||||
    "fosters-collaboration-among-producers-and-consumers": "Способствует сотрудничеству между производителями и потребителями данных.",
 | 
			
		||||
    "get-started-with-open-metadata": "Начните работу с OpenMetadata",
 | 
			
		||||
    "glossary-tag-assignement-help-message": "You can either remove this assets or remove conflicting tag from the asset and try again adding tags!",
 | 
			
		||||
    "glossary-tag-assignement-help-message": "You can either remove these assets or remove the conflicting tags from the assets, and try adding the tags again.",
 | 
			
		||||
    "glossary-tag-update-description": "This action will apply the tag to all Assets linked to the Glossary Term",
 | 
			
		||||
    "glossary-tag-update-modal-title": "Validation failed for following assets",
 | 
			
		||||
    "glossary-tag-update-modal-title": "Validation failed for the following data assets",
 | 
			
		||||
    "glossary-term-description": "Каждый термин в глоссарии имеет уникальное определение. Наряду с определением стандартного термина для понятия можно указать синонимы, а также связанные термины (например, родительские и дочерние термины). Ссылки могут быть добавлены к объектам данных, связанным с терминами. Новые термины могут быть добавлены или обновлены в Глоссарий. Термины глоссария могут быть просмотрены определенными пользователями, которые могут принять или отклонить термины.",
 | 
			
		||||
    "glossary-term-status": "Glossary Term was {{status}}.",
 | 
			
		||||
    "go-back-to-login-page": "Вернуться на страницу входа",
 | 
			
		||||
 | 
			
		||||
@ -1364,9 +1364,9 @@
 | 
			
		||||
    "find-in-table": "在数据表中查找",
 | 
			
		||||
    "fosters-collaboration-among-producers-and-consumers": "促进数据生产者和使用者之间的合作",
 | 
			
		||||
    "get-started-with-open-metadata": "开始使用 OpenMetadata",
 | 
			
		||||
    "glossary-tag-assignement-help-message": "You can either remove this assets or remove conflicting tag from the asset and try again adding tags!",
 | 
			
		||||
    "glossary-tag-assignement-help-message": "You can either remove these assets or remove the conflicting tags from the assets, and try adding the tags again.",
 | 
			
		||||
    "glossary-tag-update-description": "This action will apply the tag to all Assets linked to the Glossary Term",
 | 
			
		||||
    "glossary-tag-update-modal-title": "Validation failed for following assets",
 | 
			
		||||
    "glossary-tag-update-modal-title": "Validation failed for the following data assets",
 | 
			
		||||
    "glossary-term-description": "术语库中的每个术语都有一个唯一的定义。除了为概念定义标准术语之外,还可以指定同义词以及相关术语(例如,父项和子项)。可以向与术语相关的资产添加引用。可以向术语库添加或更新新术语。某些用户可以审查术语,并接受或拒绝这些术语。",
 | 
			
		||||
    "glossary-term-status": "Glossary Term was {{status}}.",
 | 
			
		||||
    "go-back-to-login-page": "返回登录页面",
 | 
			
		||||
 | 
			
		||||
@ -27,6 +27,7 @@ import {
 | 
			
		||||
  DASHBOARD_DROPDOWN_ITEMS,
 | 
			
		||||
  DATA_PRODUCT_DROPDOWN_ITEMS,
 | 
			
		||||
  DOMAIN_DATAPRODUCT_DROPDOWN_ITEMS,
 | 
			
		||||
  GLOSSARY_ASSETS_DROPDOWN_ITEMS,
 | 
			
		||||
  GLOSSARY_DROPDOWN_ITEMS,
 | 
			
		||||
  PIPELINE_DROPDOWN_ITEMS,
 | 
			
		||||
  SEARCH_INDEX_DROPDOWN_ITEMS,
 | 
			
		||||
@ -97,6 +98,7 @@ export const getAssetsPageQuickFilters = (type: AssetsOfEntity) => {
 | 
			
		||||
      return [...DOMAIN_DATAPRODUCT_DROPDOWN_ITEMS];
 | 
			
		||||
 | 
			
		||||
    case AssetsOfEntity.GLOSSARY:
 | 
			
		||||
      return [...GLOSSARY_ASSETS_DROPDOWN_ITEMS];
 | 
			
		||||
    default:
 | 
			
		||||
      return [...COMMON_DROPDOWN_ITEMS];
 | 
			
		||||
  }
 | 
			
		||||
 | 
			
		||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user