Created
February 15, 2018 18:49
-
-
Save oubiwann/aa531b6c47687d52809c39edf0992d78 to your computer and use it in GitHub Desktop.
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
diff --git a/indexer-app/src/cmr/indexer/data/elasticsearch.clj b/indexer-app/src/cmr/indexer/data/elasticsearch.clj | |
index c6483605e..a285edc37 100644 | |
--- a/indexer-app/src/cmr/indexer/data/elasticsearch.clj | |
+++ b/indexer-app/src/cmr/indexer/data/elasticsearch.clj | |
@@ -51,6 +51,12 @@ | |
(:transaction-id concept) | |
(map :transaction-id (:variable-associations concept)))) | |
+(defmethod get-elastic-version :service | |
+ [concept] | |
+ (apply max | |
+ (:transaction-id concept) | |
+ (map :transaction-id (:service-associations concept)))) | |
+ | |
(defmethod get-elastic-version :default | |
[concept] | |
(:revision-id concept)) | |
diff --git a/search-app/src/cmr/search/data/elastic_results_to_query_results.clj b/search-app/src/cmr/search/data/elastic_results_to_query_results.clj | |
index 60ec38223..2e1828750 100644 | |
--- a/search-app/src/cmr/search/data/elastic_results_to_query_results.clj | |
+++ b/search-app/src/cmr/search/data/elastic_results_to_query_results.clj | |
@@ -10,3 +10,7 @@ | |
(defmethod elastic-results/get-revision-id-from-elastic-result :variable | |
[concept-type elastic-result] | |
(first (get-in elastic-result [:fields :revision-id]))) | |
+ | |
+(defmethod elastic-results/get-revision-id-from-elastic-result :service | |
+ [concept-type elastic-result] | |
+ (first (get-in elastic-result [:fields :revision-id]))) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment