forked from apache/atlas
-
Notifications
You must be signed in to change notification settings - Fork 10
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #2761 from atlanhq/feat/highlights-DG-721
Add highlights to search query
- Loading branch information
Showing
8 changed files
with
86 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
33 changes: 33 additions & 0 deletions
33
intg/src/main/java/org/apache/atlas/model/discovery/ElasticsearchMetadata.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
package org.apache.atlas.model.discovery; | ||
|
||
import org.apache.commons.collections.MapUtils; | ||
|
||
import java.util.HashMap; | ||
import java.util.List; | ||
import java.util.Map; | ||
|
||
public class ElasticsearchMetadata { | ||
|
||
private Map<String, List<String>> highlights; | ||
|
||
public Map<String, List<String>> getHighlights() { | ||
return highlights; | ||
} | ||
|
||
public void addHighlights(Map<String, List<String>> highlights) { | ||
if(MapUtils.isNotEmpty(highlights)) { | ||
if (MapUtils.isEmpty(this.highlights)) { | ||
this.highlights = new HashMap<>(); | ||
} | ||
this.highlights.putAll(highlights); | ||
} | ||
} | ||
|
||
|
||
@Override | ||
public String toString() { | ||
return "SearchMetadata{" + | ||
"highlights=" + highlights + | ||
'}'; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters