update query to fix domain asset (#20467)

This commit is contained in:
Sweta Agarwalla 2025-03-27 15:16:33 +05:30 committed by GitHub
parent e6b7b89f86
commit e480e6ddf7
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -145,7 +145,24 @@ export const getQueryFilterToExcludeDomainTerms = (
export const getQueryFilterForDomain = (domainFqn: string) => ({
query: {
bool: {
must: [{ prefix: { 'domain.fullyQualifiedName': domainFqn } }],
must: [
{
bool: {
should: [
{
term: {
'domain.fullyQualifiedName': domainFqn,
},
},
{
prefix: {
'domain.fullyQualifiedName': `${domainFqn}.`,
},
},
],
},
},
],
must_not: [
{
term: {