Skip to content

Commit

Permalink
Fix detector_type bug
Browse files Browse the repository at this point in the history
Signed-off-by: Tyler Ohlsen <ohltyler@amazon.com>
  • Loading branch information
ohltyler committed Jan 27, 2024
1 parent 2aa7f31 commit fb5ea3a
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -245,7 +245,7 @@ private <T> void processHits(Map<String, SearchHit> hitsAsMap, ActionListener<T>
sb.append("{");
sb.append("id=").append(hit.getId()).append(",");
sb.append("name=").append(hit.getSourceAsMap().get("name")).append(",");
sb.append("type=").append(hit.getSourceAsMap().get("type")).append(",");
sb.append("type=").append(hit.getSourceAsMap().get("detector_type")).append(",");
sb.append("description=").append(hit.getSourceAsMap().get("description")).append(",");
sb.append("index=").append(hit.getSourceAsMap().get("indices")).append(",");
sb.append("lastUpdateTime=").append(hit.getSourceAsMap().get("last_update_time"));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,7 @@ public void testRunWithSingleAnomalyDetector() throws Exception {
XContentBuilder content = XContentBuilder.builder(XContentType.JSON.xContent());
content.startObject();
content.field("name", testDetector.getName());
content.field("type", testDetector.getDetectorType());
content.field("detector_type", testDetector.getDetectorType());
content.field("description", testDetector.getDescription());
content.field("indices", testDetector.getIndices().get(0));
content.field("last_update_time", testDetector.getLastUpdateTime().toEpochMilli());
Expand Down

0 comments on commit fb5ea3a

Please sign in to comment.