             if child.aliases
               childMatch += ' ' + child.aliases.toLowerCase()
 
-        $scope.currentBoundary.match = parentMatch + childMatch
+            if child.children
+              for subChild in child.children
+                subChild.match += childMatch
+                subChildMatch += '' + subChild.name.toLowerCase()
+                if subChildMatch.aliases
+                  subChildMatch += '' + subChild.aliases.toLowerCase()
+
+        $scope.currentBoundary.match = parentMatch + childMatch + subChildMatch
         #$scope.currentBoundary = null
 
       $scope.aliasForm.$setPristine(true)

        return boundary.name.toLowerCase().indexOf($scope.query.toLowerCase()) > -1
      return true

  $scope.clickBoundary = (state, district) ->

    $scope.safeApply ->
      $scope.stateBoundary = state
      $scope.districtBoundary = district

      if district
        $scope.currentBoundary = district
      else
        $scope.currentBoundary = state

      @$apply fn

  $scope.safeApply ->
    $http.get("/adminboundary/boundaries/" + $scope.osmId + "/").success (boundaries) ->
      $scope.boundaries = boundaries

