You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@metron.apache.org by mmiklavc <gi...@git.apache.org> on 2018/04/12 18:51:47 UTC
[GitHub] metron pull request #970: METRON-1421: Create a SolrMetaAlertDao
Github user mmiklavc commented on a diff in the pull request:
https://github.com/apache/metron/pull/970#discussion_r181186288
--- Diff: metron-platform/metron-solr/src/main/java/org/apache/metron/solr/dao/SolrSearchDao.java ---
@@ -238,19 +204,19 @@ protected SearchResponse buildSearchResponse(
return searchResponse;
}
- protected SearchResult getSearchResult(SolrDocument solrDocument, Optional<List<String>> fields) {
- SearchResult searchResult = new SearchResult();
- searchResult.setId((String) solrDocument.getFieldValue(Constants.GUID));
- Map<String, Object> source;
- if (fields.isPresent()) {
- source = new HashMap<>();
- fields.get().forEach(field -> source.put(field, solrDocument.getFieldValue(field)));
- } else {
- source = solrDocument.getFieldValueMap();
- }
- searchResult.setSource(source);
- return searchResult;
- }
+// protected SearchResult getSearchResult(SolrDocument solrDocument, Optional<List<String>> fields) {
--- End diff --
Deleted 1 commented line, added 13 more? Haha.
---