Examples of deleteByQuery()


Examples of org.apache.solr.client.solrj.impl.CloudSolrServer.deleteByQuery()

      }

      setAuthenticationUser(solrUserName);
      CloudSolrServer cloudSolrServer = getCloudSolrServer(collectionName);
      try {
        cloudSolrServer.deleteByQuery(ALL_DOCS);
        cloudSolrServer.commit();
      } finally {
        cloudSolrServer.shutdown();
      }
View Full Code Here

Examples of org.apache.solr.client.solrj.impl.CloudSolrServer.deleteByQuery()

      }

      setAuthenticationUser(solrUserName);
      CloudSolrServer cloudSolrServer = getCloudSolrServer(collectionName);
      try {
        cloudSolrServer.deleteByQuery(ALL_DOCS);
        cloudSolrServer.commit();
        fail("The specified user: " + solrUserName + " shouldn't get deletedocs access!");
      } catch (Exception exception) {
        assertTrue("Expected " + SENTRY_ERROR_MSG + " in " + exception.toString(),
            exception.toString().contains(SENTRY_ERROR_MSG));
View Full Code Here

Examples of org.apache.solr.client.solrj.impl.CloudSolrServer.deleteByQuery()

    try {
      SolrQuery query = new SolrQuery();
      query.setQuery("*:*");

      setAuthenticationUser(deleteUser);
      server.deleteByQuery(deleteByQueryStr);
      server.commit();
      QueryResponse rsp =  server.query(query);
      long junitResults = rsp.getResults().getNumFound();
      assertEquals(0, junitResults);

View Full Code Here

Examples of org.apache.solr.client.solrj.impl.CommonsHttpSolrServer.deleteByQuery()

                        CommonsHttpSolrServer solrj = new CommonsHttpSolrServer("http://" + addr.getHostAddress()
                                + ":8983/solandra/" + subIndex, new HttpClient(httpConnections));

                        try
                        {
                            solrj.deleteByQuery(cmd.query);
                        }
                        catch (SolrServerException e)
                        {
                            throw new IOException(e);
                        }
View Full Code Here

Examples of org.apache.solr.client.solrj.impl.CommonsHttpSolrServer.deleteByQuery()

  @Test
  public void testWithXml() throws Exception {
    CommonsHttpSolrServer commonsHttpSolrServer = (CommonsHttpSolrServer) getSolrServer();
    commonsHttpSolrServer.setRequestWriter(new RequestWriter());
    commonsHttpSolrServer.deleteByQuery( "*:*" ); // delete everything!   
    doIt(commonsHttpSolrServer);
  }

  @Test
  public void testWithBinary()throws Exception{
View Full Code Here

Examples of org.apache.solr.client.solrj.impl.CommonsHttpSolrServer.deleteByQuery()

  @Test
  public void testWithBinary()throws Exception{
    CommonsHttpSolrServer commonsHttpSolrServer = (CommonsHttpSolrServer) getSolrServer();
    commonsHttpSolrServer.setRequestWriter(new BinaryRequestWriter());
    commonsHttpSolrServer.deleteByQuery( "*:*" ); // delete everything!
    doIt(commonsHttpSolrServer);
  }

  @Test
  public void testWithBinaryBean()throws Exception{
View Full Code Here

Examples of org.apache.solr.client.solrj.impl.CommonsHttpSolrServer.deleteByQuery()

  @Test
  public void testWithBinaryBean()throws Exception{
    CommonsHttpSolrServer commonsHttpSolrServer = (CommonsHttpSolrServer) getSolrServer();
    commonsHttpSolrServer.setRequestWriter(new BinaryRequestWriter());
    commonsHttpSolrServer.deleteByQuery( "*:*" ); // delete everything!
    final int[] counter = new int[1];
    counter[0] = 0;
    commonsHttpSolrServer.addBeans(new Iterator<Bean>() {

      public boolean hasNext() {
View Full Code Here

Examples of org.apache.solr.client.solrj.impl.CommonsHttpSolrServer.deleteByQuery()

  static final String context = "/example";

  public void testWithXml() throws Exception {
    CommonsHttpSolrServer commonsHttpSolrServer = (CommonsHttpSolrServer) getSolrServer();
    commonsHttpSolrServer.setRequestWriter(new RequestWriter());
    commonsHttpSolrServer.deleteByQuery( "*:*" ); // delete everything!   
    doIt(commonsHttpSolrServer);
  }

  public void testWithBinary()throws Exception{
    CommonsHttpSolrServer commonsHttpSolrServer = (CommonsHttpSolrServer) getSolrServer();
View Full Code Here

Examples of org.apache.solr.client.solrj.impl.CommonsHttpSolrServer.deleteByQuery()

  }

  public void testWithBinary()throws Exception{
    CommonsHttpSolrServer commonsHttpSolrServer = (CommonsHttpSolrServer) getSolrServer();
    commonsHttpSolrServer.setRequestWriter(new BinaryRequestWriter());
    commonsHttpSolrServer.deleteByQuery( "*:*" ); // delete everything!
    doIt(commonsHttpSolrServer);
  }

  public void testWithBinaryBean()throws Exception{
    CommonsHttpSolrServer commonsHttpSolrServer = (CommonsHttpSolrServer) getSolrServer();
View Full Code Here

Examples of org.apache.solr.client.solrj.impl.CommonsHttpSolrServer.deleteByQuery()

  }

  public void testWithBinaryBean()throws Exception{
    CommonsHttpSolrServer commonsHttpSolrServer = (CommonsHttpSolrServer) getSolrServer();
    commonsHttpSolrServer.setRequestWriter(new BinaryRequestWriter());
    commonsHttpSolrServer.deleteByQuery( "*:*" ); // delete everything!
    final int[] counter = new int[1];
    counter[0] = 0;
    commonsHttpSolrServer.addBeans(new Iterator<Bean>() {

      public boolean hasNext() {
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.