cdmikechen created ATLAS-4823:
---------------------------------
Summary: Calling quick search REST with "_ALL_ENTITY_TYPES" does
not return aggregationMetrics results
Key: ATLAS-4823
URL: https://issues.apache.org/jira/browse/ATLAS-4823
Project: Atlas
Issue Type: Bug
Components: atlas-core
Affects Versions: 2.3.0
Reporter: cdmikechen
request:
{code:json}
{"query":"\"badger_err_event\"","entityFilters":{"condition":"AND","criterion":[{"attributeName":"datasource_info.tenantId","operator":"=","attributeValue":"394284867937894403"},{"attributeName":"datasource_info.projectId","operator":"=","attributeValue":"default"}]},"offset":0,"limit":10,"typeName":"_ALL_ENTITY_TYPES","includeSubTypes":true}
{code}
response:
{code:json}
{"searchResults":{"queryType":"BASIC","searchParameters":{"query":"\"badger_err_event\"","typeName":"_ALL_ENTITY_TYPES","excludeDeletedEntities":false,"includeClassificationAttributes":false,"includeSubTypes":true,"includeSubClassifications":true,"excludeHeaderAttributes":false,"limit":10,"offset":0,"entityFilters":{"condition":"AND","criterion":[{"attributeName":"datasource_info.tenantId","operator":"=","attributeValue":"394284867937894403"},{"attributeName":"datasource_info.projectId","operator":"=","attributeValue":"default"}]}},"queryText":"\"badger_err_event\"","entities":[{"typeName":"rdbms_table","attributes":{"owner":"","datasource_info.projectId":"default","createTime":0,"qualifiedName":"PostgreSQL/10.3.101.188:5433/table:[email protected]","name":"badger_err_event","description":"","datasource_info.tenantId":"394284867937894403"},"guid":"479e5339-087b-42e7-a33c-b74ca85a12dc","status":"ACTIVE","displayText":"badger_err_event","classificationNames":[],"meaningNames":[],"meanings":[],"isIncomplete":false,"labels":[]}],"approximateCount":1},"aggregationMetrics":{"__typeName":[],"__state":[],"ServiceType":[],"Asset.owner":[]}}
{code}
After debugging, it was found that the processing of entityTypes used
__ENTITY_ROOT, resulting in incorrect filtering in Solr queries:
{code}
2024-01-08 13:26:40,069 DEBUG - [etp1864869682-182 -
c98a0068-d019-4ac2-aed9-f7983acde50c:] ~ Final query string prepared is
+"badger_err_event" AND +f0l_t:(__ENTITY_ROOT ) AND ( (
+17vgl_t:394284867937894403 ) AND ( +17x1h_t:default ) )
(AtlasJanusGraphIndexClient:232 )
{code}
--
This message was sent by Atlassian Jira
(v8.20.10#820010)