From 19b5f18ae508829262a18b84a5906474fc98b298 Mon Sep 17 00:00:00 2001 From: Daniel Kats Date: Fri, 25 Jul 2014 13:48:56 -0700 Subject: [PATCH] fix to advanced search --- js/controllers.js | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/js/controllers.js b/js/controllers.js index b92bd4d..847d2fd 100755 --- a/js/controllers.js +++ b/js/controllers.js @@ -464,7 +464,12 @@ function SearchCtrl($scope, $sce, $routeParams, $location, elastic, configuratio } $scope.redirectSearch = function () { - $location.path("/search/" + $scope.search.simple); + if ($scope.search.advanced.searchSources.length === 0) { + $location.path("/search/" + $scope.search.simple); + } else { + // handle the case when sources are specified + $scope.restartSearch(); + } }; if ($routeParams.hasOwnProperty("searchStr") && $routeParams.searchStr) {