Skip to content

Commit f01fd52

Browse files
committed
update the query page to work with 1.0.x
1 parent c3d23fe commit f01fd52

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

_site/js/controllers/QueryInput.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ function QueryInput($scope, $http, $filter, Data, pubsub){
4444
$scope.autodetectField = function() {
4545
$scope.data.autodetectfield = false;
4646

47-
for (i in $scope.data.mapping[$scope.data.currentIndex][$scope.data.currentType].properties){
47+
for (i in $scope.data.mapping[$scope.data.currentIndex].mappings[$scope.data.currentType].properties){
4848
if ($scope.data.query.match(i)){
4949
console.log("match",i);
5050
$scope.data.autodetectfield = true;
@@ -63,7 +63,7 @@ function QueryInput($scope, $http, $filter, Data, pubsub){
6363
//inject the highlighter
6464
var query = $scope.data.query.slice(0,-1);
6565
var highlightFields = [];
66-
for (i in $scope.data.mapping[$scope.data.currentIndex][$scope.data.currentType].properties){
66+
for (i in $scope.data.mapping[$scope.data.currentIndex].mappings[$scope.data.currentType].properties){
6767
if (query.match(i))
6868
highlightFields.push('"' + i + '": {}');
6969
}

0 commit comments

Comments
 (0)