Skip to content

Commit

Permalink
Fix Search Index for ER Model (#19349)
Browse files Browse the repository at this point in the history
  • Loading branch information
mohityadav766 authored Jan 14, 2025
1 parent a8b3037 commit 3c2f037
Showing 1 changed file with 3 additions and 4 deletions.
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package org.openmetadata.service.search.indexes;

import static org.openmetadata.common.utils.CommonUtil.nullOrEmpty;
import static org.openmetadata.schema.type.Include.NON_DELETED;
import static org.openmetadata.schema.type.Include.ALL;
import static org.openmetadata.service.Entity.FIELD_DESCRIPTION;
import static org.openmetadata.service.Entity.FIELD_DISPLAY_NAME;
import static org.openmetadata.service.Entity.getEntityByName;
Expand Down Expand Up @@ -196,7 +196,7 @@ private static void processConstraints(
String destinationIndexName = null;
try {
if (updateForeignTableIndex) {
relatedEntity = getEntityByName(Entity.TABLE, relatedEntityFQN, "*", NON_DELETED);
relatedEntity = getEntityByName(Entity.TABLE, relatedEntityFQN, "*", ALL);
IndexMapping destinationIndexMapping =
Entity.getSearchRepository()
.getIndexMapping(relatedEntity.getEntityReference().getType());
Expand Down Expand Up @@ -253,8 +253,7 @@ static List<Map<String, Object>> populateEntityRelationshipData(Table entity) {
.findFrom(entity.getId(), Entity.TABLE, Relationship.RELATED_TO.ordinal());

for (CollectionDAO.EntityRelationshipRecord table : relatedTables) {
Table foreignTable =
Entity.getEntity(Entity.TABLE, table.getId(), "tableConstraints", NON_DELETED);
Table foreignTable = Entity.getEntity(Entity.TABLE, table.getId(), "tableConstraints", ALL);
processConstraints(foreignTable, entity, constraints, false);
}
return constraints;
Expand Down

0 comments on commit 3c2f037

Please sign in to comment.