diff --git a/intg/src/main/java/org/apache/atlas/model/discovery/ElasticsearchMetadata.java b/intg/src/main/java/org/apache/atlas/model/discovery/ElasticsearchMetadata.java index 8f6c9e9b3b..096ff82b83 100644 --- a/intg/src/main/java/org/apache/atlas/model/discovery/ElasticsearchMetadata.java +++ b/intg/src/main/java/org/apache/atlas/model/discovery/ElasticsearchMetadata.java @@ -31,7 +31,11 @@ public void addHighlights(Map> highlights) { public Object getSort() { return sort; } public void addSort(ArrayList sort) { - this.sort = sort; + if (sort.isEmpty()) { + this.sort = null; + } else { + this.sort = sort; + } } @Override