     $scope.searchBox = ->
       console.log("The search box was :", $scope.searchBoxQuery)
       console.log("The original query was :", $scope.originalQuery)
+
+      # Handle user clearing search box and hitting enter
       if $scope.searchBoxQuery? and $scope.searchBoxQuery != ""
         $scope.originalQuery = $scope.searchBoxQuery
       else
         $scope.originalQuery = "*"
+
       $scope.query = $scope.originalQuery
       $scope.offset = 0
       console.log("NEW SEARCH:", $scope.query)

        $scope.query = "*"
        $scope.search()
        return
      # if !$scope.query? or !$scope.query or $scope.query == "" or $scope.query == "null" or $scope.query == "false" or $scope.query == "undefined"
        # $scope.query = "*"
      console.log("query before anything:", $scope.query)
      console.log("RES:", res)
      models = createModels(res)
      $scope.partyModels = models.parties
      $scope.volumeModels = models.volumes

      return res?.facets?.content_type?.buckets[idx].count ? 0

    findResult = (typeName, res) ->
      if res != null
        groups = (group.groupValue for group in res.grouped.content_type.groups)
        return groups.indexOf(typeName)
