         $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

      beforeQuery = $scope.query
      query = $scope.query + "|type=container"
      query = searchVolume(vol, query)
      # query = $scope.query + "|type=container|arg=container_volume_id_i:" + "15"
      $scope.search(query, vol.id)
      $scope.query = beforeQuery


      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)
