@SuppressWarnings("finally")
  public boolean deleteItems(Query query) {
    boolean status = false;
    try {
      server.deleteByQuery(query.getQueryString());
      UpdateResponse response = server.commit();
      int statusId = response.getStatus();
      if (statusId == 0) {
        status = true;
      }

    } catch (SolrServerException ex) {
      Logger.getRootLogger().error(ex.getMessage());
    } catch (IOException ex) {
      Logger.getRootLogger().error(ex.getMessage());
    } finally {
      return status;
    }
  }
 public SearchEngineResponse<MediaItem> removeFilterAndSearchItems(Query query, String fq) {
   SolrQuery solrQuery = new SolrQuery(query.getQueryString());
   return removeFilterAndSearch(solrQuery, fq);
 }
 public SearchEngineResponse<MediaItem> addFilterAndSearchItems(Query query, String fq) {
   SolrQuery solrQuery = new SolrQuery(query.getQueryString());
   solrQuery.addFilterQuery(fq);
   return search(solrQuery);
 }