mirror of
https://github.com/open-metadata/OpenMetadata.git
synced 2025-09-26 17:34:41 +00:00
Fix failed to parse field [followers] of type [keyword] in document with i (#15670)
This commit is contained in:
parent
5f206111fe
commit
5be7bca5f8
@ -27,6 +27,7 @@ public record ChartIndex(Chart chart) implements SearchIndex {
|
|||||||
doc.put("entityType", Entity.CHART);
|
doc.put("entityType", Entity.CHART);
|
||||||
doc.put("owner", getEntityWithDisplayName(chart.getOwner()));
|
doc.put("owner", getEntityWithDisplayName(chart.getOwner()));
|
||||||
doc.put("domain", getEntityWithDisplayName(chart.getDomain()));
|
doc.put("domain", getEntityWithDisplayName(chart.getDomain()));
|
||||||
|
doc.put("followers", SearchIndexUtils.parseFollowers(chart.getFollowers()));
|
||||||
doc.put(
|
doc.put(
|
||||||
"totalVotes",
|
"totalVotes",
|
||||||
CommonUtil.nullOrEmpty(chart.getVotes())
|
CommonUtil.nullOrEmpty(chart.getVotes())
|
||||||
|
@ -3,7 +3,6 @@ package org.openmetadata.service.search.indexes;
|
|||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
import java.util.stream.Collectors;
|
|
||||||
import org.openmetadata.schema.entity.classification.Classification;
|
import org.openmetadata.schema.entity.classification.Classification;
|
||||||
import org.openmetadata.service.Entity;
|
import org.openmetadata.service.Entity;
|
||||||
import org.openmetadata.service.search.SearchIndexUtils;
|
import org.openmetadata.service.search.SearchIndexUtils;
|
||||||
@ -24,10 +23,11 @@ public record ClassificationIndex(Classification classification) implements Sear
|
|||||||
"fqnParts",
|
"fqnParts",
|
||||||
getFQNParts(
|
getFQNParts(
|
||||||
classification.getFullyQualifiedName(),
|
classification.getFullyQualifiedName(),
|
||||||
suggest.stream().map(SearchSuggest::getInput).collect(Collectors.toList())));
|
suggest.stream().map(SearchSuggest::getInput).toList()));
|
||||||
doc.put("suggest", suggest);
|
doc.put("suggest", suggest);
|
||||||
doc.put("entityType", Entity.CLASSIFICATION);
|
doc.put("entityType", Entity.CLASSIFICATION);
|
||||||
doc.put("owner", getEntityWithDisplayName(classification.getOwner()));
|
doc.put("owner", getEntityWithDisplayName(classification.getOwner()));
|
||||||
|
doc.put("followers", SearchIndexUtils.parseFollowers(classification.getFollowers()));
|
||||||
return doc;
|
return doc;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -29,6 +29,7 @@ public record DashboardServiceIndex(DashboardService dashboardService) implement
|
|||||||
doc.put("entityType", Entity.DASHBOARD_SERVICE);
|
doc.put("entityType", Entity.DASHBOARD_SERVICE);
|
||||||
doc.put("owner", getEntityWithDisplayName(dashboardService.getOwner()));
|
doc.put("owner", getEntityWithDisplayName(dashboardService.getOwner()));
|
||||||
doc.put("domain", getEntityWithDisplayName(dashboardService.getDomain()));
|
doc.put("domain", getEntityWithDisplayName(dashboardService.getDomain()));
|
||||||
|
doc.put("followers", SearchIndexUtils.parseFollowers(dashboardService.getFollowers()));
|
||||||
return doc;
|
return doc;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -27,6 +27,7 @@ public record DataProductIndex(DataProduct dataProduct) implements SearchIndex {
|
|||||||
doc.put("entityType", Entity.DATA_PRODUCT);
|
doc.put("entityType", Entity.DATA_PRODUCT);
|
||||||
doc.put("owner", getEntityWithDisplayName(dataProduct.getOwner()));
|
doc.put("owner", getEntityWithDisplayName(dataProduct.getOwner()));
|
||||||
doc.put("domain", getEntityWithDisplayName(dataProduct.getDomain()));
|
doc.put("domain", getEntityWithDisplayName(dataProduct.getDomain()));
|
||||||
|
doc.put("followers", SearchIndexUtils.parseFollowers(dataProduct.getFollowers()));
|
||||||
return doc;
|
return doc;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -33,6 +33,7 @@ public record DatabaseIndex(Database database) implements SearchIndex {
|
|||||||
: database.getVotes().getUpVotes() - database.getVotes().getDownVotes());
|
: database.getVotes().getUpVotes() - database.getVotes().getDownVotes());
|
||||||
doc.put("owner", getEntityWithDisplayName(database.getOwner()));
|
doc.put("owner", getEntityWithDisplayName(database.getOwner()));
|
||||||
doc.put("domain", getEntityWithDisplayName(database.getDomain()));
|
doc.put("domain", getEntityWithDisplayName(database.getDomain()));
|
||||||
|
doc.put("followers", SearchIndexUtils.parseFollowers(database.getFollowers()));
|
||||||
return doc;
|
return doc;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -34,6 +34,7 @@ public record DatabaseSchemaIndex(DatabaseSchema databaseSchema) implements Sear
|
|||||||
? 0
|
? 0
|
||||||
: databaseSchema.getVotes().getUpVotes() - databaseSchema.getVotes().getDownVotes());
|
: databaseSchema.getVotes().getUpVotes() - databaseSchema.getVotes().getDownVotes());
|
||||||
doc.put("domain", getEntityWithDisplayName(databaseSchema.getDomain()));
|
doc.put("domain", getEntityWithDisplayName(databaseSchema.getDomain()));
|
||||||
|
doc.put("followers", SearchIndexUtils.parseFollowers(databaseSchema.getFollowers()));
|
||||||
return doc;
|
return doc;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -3,7 +3,6 @@ package org.openmetadata.service.search.indexes;
|
|||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
import java.util.stream.Collectors;
|
|
||||||
import org.openmetadata.schema.entity.services.DatabaseService;
|
import org.openmetadata.schema.entity.services.DatabaseService;
|
||||||
import org.openmetadata.service.Entity;
|
import org.openmetadata.service.Entity;
|
||||||
import org.openmetadata.service.search.SearchIndexUtils;
|
import org.openmetadata.service.search.SearchIndexUtils;
|
||||||
@ -24,11 +23,12 @@ public record DatabaseServiceIndex(DatabaseService databaseService) implements S
|
|||||||
"fqnParts",
|
"fqnParts",
|
||||||
getFQNParts(
|
getFQNParts(
|
||||||
databaseService.getFullyQualifiedName(),
|
databaseService.getFullyQualifiedName(),
|
||||||
suggest.stream().map(SearchSuggest::getInput).collect(Collectors.toList())));
|
suggest.stream().map(SearchSuggest::getInput).toList()));
|
||||||
doc.put("suggest", suggest);
|
doc.put("suggest", suggest);
|
||||||
doc.put("entityType", Entity.DATABASE_SERVICE);
|
doc.put("entityType", Entity.DATABASE_SERVICE);
|
||||||
doc.put("owner", getEntityWithDisplayName(databaseService.getOwner()));
|
doc.put("owner", getEntityWithDisplayName(databaseService.getOwner()));
|
||||||
doc.put("domain", getEntityWithDisplayName(databaseService.getDomain()));
|
doc.put("domain", getEntityWithDisplayName(databaseService.getDomain()));
|
||||||
|
doc.put("followers", SearchIndexUtils.parseFollowers(databaseService.getFollowers()));
|
||||||
return doc;
|
return doc;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -25,6 +25,7 @@ public record DomainIndex(Domain domain) implements SearchIndex {
|
|||||||
suggest.stream().map(SearchSuggest::getInput).toList()));
|
suggest.stream().map(SearchSuggest::getInput).toList()));
|
||||||
doc.put("suggest", suggest);
|
doc.put("suggest", suggest);
|
||||||
doc.put("entityType", Entity.DOMAIN);
|
doc.put("entityType", Entity.DOMAIN);
|
||||||
|
doc.put("followers", SearchIndexUtils.parseFollowers(domain.getFollowers()));
|
||||||
return doc;
|
return doc;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -40,6 +40,7 @@ public class GlossaryIndex implements SearchIndex {
|
|||||||
? 0
|
? 0
|
||||||
: glossary.getVotes().getUpVotes() - glossary.getVotes().getDownVotes());
|
: glossary.getVotes().getUpVotes() - glossary.getVotes().getDownVotes());
|
||||||
doc.put("domain", getEntityWithDisplayName(glossary.getDomain()));
|
doc.put("domain", getEntityWithDisplayName(glossary.getDomain()));
|
||||||
|
doc.put("followers", SearchIndexUtils.parseFollowers(glossary.getFollowers()));
|
||||||
return doc;
|
return doc;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -40,6 +40,7 @@ public class GlossaryTermIndex implements SearchIndex {
|
|||||||
: glossaryTerm.getVotes().getUpVotes() - glossaryTerm.getVotes().getDownVotes());
|
: glossaryTerm.getVotes().getUpVotes() - glossaryTerm.getVotes().getDownVotes());
|
||||||
doc.put("owner", getEntityWithDisplayName(glossaryTerm.getOwner()));
|
doc.put("owner", getEntityWithDisplayName(glossaryTerm.getOwner()));
|
||||||
doc.put("domain", getEntityWithDisplayName(glossaryTerm.getDomain()));
|
doc.put("domain", getEntityWithDisplayName(glossaryTerm.getDomain()));
|
||||||
|
doc.put("followers", SearchIndexUtils.parseFollowers(glossaryTerm.getFollowers()));
|
||||||
return doc;
|
return doc;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -3,7 +3,6 @@ package org.openmetadata.service.search.indexes;
|
|||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
import java.util.stream.Collectors;
|
|
||||||
import org.openmetadata.schema.entity.services.MessagingService;
|
import org.openmetadata.schema.entity.services.MessagingService;
|
||||||
import org.openmetadata.service.Entity;
|
import org.openmetadata.service.Entity;
|
||||||
import org.openmetadata.service.search.SearchIndexUtils;
|
import org.openmetadata.service.search.SearchIndexUtils;
|
||||||
@ -24,11 +23,12 @@ public record MessagingServiceIndex(MessagingService messagingService) implement
|
|||||||
"fqnParts",
|
"fqnParts",
|
||||||
getFQNParts(
|
getFQNParts(
|
||||||
messagingService.getFullyQualifiedName(),
|
messagingService.getFullyQualifiedName(),
|
||||||
suggest.stream().map(SearchSuggest::getInput).collect(Collectors.toList())));
|
suggest.stream().map(SearchSuggest::getInput).toList()));
|
||||||
doc.put("suggest", suggest);
|
doc.put("suggest", suggest);
|
||||||
doc.put("entityType", Entity.MESSAGING_SERVICE);
|
doc.put("entityType", Entity.MESSAGING_SERVICE);
|
||||||
doc.put("owner", getEntityWithDisplayName(messagingService.getOwner()));
|
doc.put("owner", getEntityWithDisplayName(messagingService.getOwner()));
|
||||||
doc.put("domain", getEntityWithDisplayName(messagingService.getDomain()));
|
doc.put("domain", getEntityWithDisplayName(messagingService.getDomain()));
|
||||||
|
doc.put("followers", SearchIndexUtils.parseFollowers(messagingService.getFollowers()));
|
||||||
return doc;
|
return doc;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -3,7 +3,6 @@ package org.openmetadata.service.search.indexes;
|
|||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
import java.util.stream.Collectors;
|
|
||||||
import org.openmetadata.schema.entity.services.MetadataService;
|
import org.openmetadata.schema.entity.services.MetadataService;
|
||||||
import org.openmetadata.service.Entity;
|
import org.openmetadata.service.Entity;
|
||||||
import org.openmetadata.service.search.SearchIndexUtils;
|
import org.openmetadata.service.search.SearchIndexUtils;
|
||||||
@ -24,10 +23,11 @@ public record MetadataServiceIndex(MetadataService metadataService) implements S
|
|||||||
"fqnParts",
|
"fqnParts",
|
||||||
getFQNParts(
|
getFQNParts(
|
||||||
metadataService.getFullyQualifiedName(),
|
metadataService.getFullyQualifiedName(),
|
||||||
suggest.stream().map(SearchSuggest::getInput).collect(Collectors.toList())));
|
suggest.stream().map(SearchSuggest::getInput).toList()));
|
||||||
doc.put("suggest", suggest);
|
doc.put("suggest", suggest);
|
||||||
doc.put("entityType", Entity.METADATA_SERVICE);
|
doc.put("entityType", Entity.METADATA_SERVICE);
|
||||||
doc.put("owner", getEntityWithDisplayName(metadataService.getOwner()));
|
doc.put("owner", getEntityWithDisplayName(metadataService.getOwner()));
|
||||||
|
doc.put("followers", SearchIndexUtils.parseFollowers(metadataService.getFollowers()));
|
||||||
return doc;
|
return doc;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -3,7 +3,6 @@ package org.openmetadata.service.search.indexes;
|
|||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
import java.util.stream.Collectors;
|
|
||||||
import org.openmetadata.schema.entity.services.MlModelService;
|
import org.openmetadata.schema.entity.services.MlModelService;
|
||||||
import org.openmetadata.service.Entity;
|
import org.openmetadata.service.Entity;
|
||||||
import org.openmetadata.service.search.SearchIndexUtils;
|
import org.openmetadata.service.search.SearchIndexUtils;
|
||||||
@ -24,10 +23,11 @@ public record MlModelServiceIndex(MlModelService mlModelService) implements Sear
|
|||||||
"fqnParts",
|
"fqnParts",
|
||||||
getFQNParts(
|
getFQNParts(
|
||||||
mlModelService.getFullyQualifiedName(),
|
mlModelService.getFullyQualifiedName(),
|
||||||
suggest.stream().map(SearchSuggest::getInput).collect(Collectors.toList())));
|
suggest.stream().map(SearchSuggest::getInput).toList()));
|
||||||
doc.put("suggest", suggest);
|
doc.put("suggest", suggest);
|
||||||
doc.put("entityType", Entity.MLMODEL_SERVICE);
|
doc.put("entityType", Entity.MLMODEL_SERVICE);
|
||||||
doc.put("owner", getEntityWithDisplayName(mlModelService.getOwner()));
|
doc.put("owner", getEntityWithDisplayName(mlModelService.getOwner()));
|
||||||
|
doc.put("followers", SearchIndexUtils.parseFollowers(mlModelService.getFollowers()));
|
||||||
return doc;
|
return doc;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -3,7 +3,6 @@ package org.openmetadata.service.search.indexes;
|
|||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
import java.util.stream.Collectors;
|
|
||||||
import org.openmetadata.schema.entity.services.PipelineService;
|
import org.openmetadata.schema.entity.services.PipelineService;
|
||||||
import org.openmetadata.service.Entity;
|
import org.openmetadata.service.Entity;
|
||||||
import org.openmetadata.service.search.SearchIndexUtils;
|
import org.openmetadata.service.search.SearchIndexUtils;
|
||||||
@ -26,8 +25,9 @@ public record PipelineServiceIndex(PipelineService pipelineService) implements S
|
|||||||
"fqnParts",
|
"fqnParts",
|
||||||
getFQNParts(
|
getFQNParts(
|
||||||
pipelineService.getFullyQualifiedName(),
|
pipelineService.getFullyQualifiedName(),
|
||||||
suggest.stream().map(SearchSuggest::getInput).collect(Collectors.toList())));
|
suggest.stream().map(SearchSuggest::getInput).toList()));
|
||||||
doc.put("owner", getEntityWithDisplayName(pipelineService.getOwner()));
|
doc.put("owner", getEntityWithDisplayName(pipelineService.getOwner()));
|
||||||
|
doc.put("followers", SearchIndexUtils.parseFollowers(pipelineService.getFollowers()));
|
||||||
return doc;
|
return doc;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -27,6 +27,7 @@ public record SearchServiceIndex(SearchService searchService) implements SearchI
|
|||||||
searchService.getFullyQualifiedName(),
|
searchService.getFullyQualifiedName(),
|
||||||
suggest.stream().map(SearchSuggest::getInput).toList()));
|
suggest.stream().map(SearchSuggest::getInput).toList()));
|
||||||
doc.put("owner", getEntityWithDisplayName(searchService.getOwner()));
|
doc.put("owner", getEntityWithDisplayName(searchService.getOwner()));
|
||||||
|
doc.put("followers", SearchIndexUtils.parseFollowers(searchService.getFollowers()));
|
||||||
return doc;
|
return doc;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -27,6 +27,7 @@ public record StorageServiceIndex(StorageService storageService) implements Sear
|
|||||||
doc.put("suggest", suggest);
|
doc.put("suggest", suggest);
|
||||||
doc.put("entityType", Entity.STORAGE_SERVICE);
|
doc.put("entityType", Entity.STORAGE_SERVICE);
|
||||||
doc.put("owner", getEntityWithDisplayName(storageService.getOwner()));
|
doc.put("owner", getEntityWithDisplayName(storageService.getOwner()));
|
||||||
|
doc.put("followers", SearchIndexUtils.parseFollowers(storageService.getFollowers()));
|
||||||
return doc;
|
return doc;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -29,6 +29,7 @@ public record TagIndex(Tag tag) implements SearchIndex {
|
|||||||
}
|
}
|
||||||
doc.put("suggest", suggest);
|
doc.put("suggest", suggest);
|
||||||
doc.put("entityType", Entity.TAG);
|
doc.put("entityType", Entity.TAG);
|
||||||
|
doc.put("followers", SearchIndexUtils.parseFollowers(tag.getFollowers()));
|
||||||
return doc;
|
return doc;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -34,6 +34,7 @@ public class TeamIndex implements SearchIndex {
|
|||||||
doc.put(
|
doc.put(
|
||||||
"displayName",
|
"displayName",
|
||||||
CommonUtil.nullOrEmpty(team.getDisplayName()) ? team.getName() : team.getDisplayName());
|
CommonUtil.nullOrEmpty(team.getDisplayName()) ? team.getName() : team.getDisplayName());
|
||||||
|
doc.put("followers", SearchIndexUtils.parseFollowers(team.getFollowers()));
|
||||||
return doc;
|
return doc;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -40,6 +40,7 @@ public record TestCaseIndex(TestCase testCase) implements SearchIndex {
|
|||||||
doc.put("suggest", suggest);
|
doc.put("suggest", suggest);
|
||||||
doc.put("entityType", Entity.TEST_CASE);
|
doc.put("entityType", Entity.TEST_CASE);
|
||||||
doc.put("owner", getEntityWithDisplayName(testCase.getOwner()));
|
doc.put("owner", getEntityWithDisplayName(testCase.getOwner()));
|
||||||
|
doc.put("followers", SearchIndexUtils.parseFollowers(testCase.getFollowers()));
|
||||||
return doc;
|
return doc;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -26,6 +26,7 @@ public record TestSuiteIndex(TestSuite testSuite) implements SearchIndex {
|
|||||||
doc.put("suggest", suggest);
|
doc.put("suggest", suggest);
|
||||||
doc.put("entityType", Entity.TEST_SUITE);
|
doc.put("entityType", Entity.TEST_SUITE);
|
||||||
doc.put("owner", getEntityWithDisplayName(testSuite.getOwner()));
|
doc.put("owner", getEntityWithDisplayName(testSuite.getOwner()));
|
||||||
|
doc.put("followers", SearchIndexUtils.parseFollowers(testSuite.getFollowers()));
|
||||||
return doc;
|
return doc;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -37,6 +37,7 @@ public class UserIndex implements SearchIndex {
|
|||||||
if (user.getIsBot() == null) {
|
if (user.getIsBot() == null) {
|
||||||
doc.put("isBot", false);
|
doc.put("isBot", false);
|
||||||
}
|
}
|
||||||
|
doc.put("followers", SearchIndexUtils.parseFollowers(user.getFollowers()));
|
||||||
return doc;
|
return doc;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user