Skip to content

Commit

Permalink
Merge pull request #31 from obourgain/master
Browse files Browse the repository at this point in the history
get mapping response change with 1.0.x
  • Loading branch information
polyfractal committed Mar 20, 2014
2 parents 9bc2d4b + f01fd52 commit 92ad6f8
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion _site/js/controllers/DropdownCtrl.js
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ function DropdownCtrl($scope, $http, Data, pubsub) {

$scope.indices.push(i);
$scope.types[i] = [];
for (j in response.data[i]){
for (j in response.data[i].mappings){

$scope.types[i].push(j);
}
Expand Down
4 changes: 2 additions & 2 deletions _site/js/controllers/QueryInput.js
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ function QueryInput($scope, $http, $filter, Data, pubsub){
$scope.autodetectField = function() {
$scope.data.autodetectfield = false;

for (i in $scope.data.mapping[$scope.data.currentIndex][$scope.data.currentType].properties){
for (i in $scope.data.mapping[$scope.data.currentIndex].mappings[$scope.data.currentType].properties){
if ($scope.data.query.match(i)){
console.log("match",i);
$scope.data.autodetectfield = true;
Expand All @@ -63,7 +63,7 @@ function QueryInput($scope, $http, $filter, Data, pubsub){
//inject the highlighter
var query = $scope.data.query.slice(0,-1);
var highlightFields = [];
for (i in $scope.data.mapping[$scope.data.currentIndex][$scope.data.currentType].properties){
for (i in $scope.data.mapping[$scope.data.currentIndex].mappings[$scope.data.currentType].properties){
if (query.match(i))
highlightFields.push('"' + i + '": {}');
}
Expand Down

0 comments on commit 92ad6f8

Please sign in to comment.