Skip to content

Commit

Permalink
Return explDict in same format as _search with explain does
Browse files Browse the repository at this point in the history
  • Loading branch information
worleydl committed Jan 9, 2020
1 parent 1d6fbe4 commit 564c4bb
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 12 deletions.
7 changes: 1 addition & 6 deletions factories/esSearcherFactory.js
Original file line number Diff line number Diff line change
Expand Up @@ -312,12 +312,7 @@

return $http.post(url, { query: self.queryDsl.query }, {headers: headers})
.then(function(response) {
var explDict = {
match: response.data.matched,
explanation: response.data.explanation,
description: response.data.explanation.description,
value: response.data.explanation.value,
};
var explDict = response.data.explanation || null;

var options = {
fieldList: self.fieldList,
Expand Down
7 changes: 1 addition & 6 deletions splainer-search.js
Original file line number Diff line number Diff line change
Expand Up @@ -2769,12 +2769,7 @@ angular.module('o19s.splainer-search')

return $http.post(url, { query: self.queryDsl.query }, {headers: headers})
.then(function(response) {
var explDict = {
match: response.data.matched,
explanation: response.data.explanation,
description: response.data.explanation.description,
value: response.data.explanation.value,
};
var explDict = response.data.explanation || null;

var options = {
fieldList: self.fieldList,
Expand Down

0 comments on commit 564c4bb

Please sign in to comment.