Examples of deleteByQuery()


Examples of org.apache.solr.client.solrj.request.UpdateRequest.deleteByQuery()

      UpdateRequest req = new UpdateRequest();
      for (Object delete : deletes) {
        if (delete instanceof String) {
          req.deleteById((String)delete); // add the delete to the req list
        } else {
          req.deleteByQuery(((StringBuilder)delete).toString()); // add the delete to the req list
        }
      }
      req.setCommitWithin(-1);
      log(req.process(server));
      deletes.clear();
View Full Code Here

Examples of org.apache.solr.update.UpdateHandler.deleteByQuery()

          updateHandler.delete(cmd);
          log.info("delete(id " + val + ") 0 " +
                   (System.currentTimeMillis()-startTime));
        } else if ("query".equals(currTag)) {
          cmd.query =  val;
          updateHandler.deleteByQuery(cmd);
          log.info("deleteByQuery(query " + val + ") 0 " +
                   (System.currentTimeMillis()-startTime));
        } else {
          log.warning("unexpected XML tag /delete/"+currTag);
          throw new SolrException( SolrException.ErrorCode.BAD_REQUEST,"unexpected XML tag /delete/"+currTag);
View Full Code Here

Examples of org.elasticsearch.index.shard.service.IndexShard.deleteByQuery()

                indexShard.acquireSearcher(DELETE_BY_QUERY_API), indexService, indexShard, scriptService,
                pageCacheRecycler, bigArrays, threadPool.estimatedTimeInMillisCounter()));
        try {
            Engine.DeleteByQuery deleteByQuery = indexShard.prepareDeleteByQuery(request.source(), request.filteringAliases(), Engine.Operation.Origin.PRIMARY, request.types());
            SearchContext.current().parsedQuery(new ParsedQuery(deleteByQuery.query(), ImmutableMap.<String, Filter>of()));
            indexShard.deleteByQuery(deleteByQuery);
        } finally {
            try (SearchContext searchContext = SearchContext.current()) {
                SearchContext.removeCurrent();
            }
        }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.