Examples of deleteById()


Examples of org.apache.solr.client.solrj.SolrServer.deleteById()

            String id = idList.get(i);
            idList.remove(i);
            idList.add(i, id);
        }
        try {
            solrServer.deleteById(idList);
            solrServer.commit();
        } catch (SolrServerException e) {
            log.error("Solr Server Exception", e);
            throw new StoreException(e.getMessage(), e);
        } catch (IOException e) {
View Full Code Here

Examples of org.apache.solr.client.solrj.SolrServer.deleteById()

                            fieldMapper.getDocumentDomainField(),
                            SolrUtil.escapeSolrSpecialChars(getId()),
                            fieldMapper.getDocumentIdField(),
                            SolrUtil.escapeSolrSpecialChars(id)));
                    } else {
                        server.deleteById(id);
                    }
                    server.commit();
                    return null;
                }
            });
View Full Code Here

Examples of org.apache.solr.client.solrj.SolrServer.deleteById()

                                SolrUtil.escapeSolrSpecialChars(getId()),
                                fieldMapper.getDocumentIdField(),
                                SolrUtil.escapeSolrSpecialChars(id)));
                        }
                    } else {
                        server.deleteById(toRemove);
                    }
                    server.commit();
                    return null;
                }
            });
View Full Code Here

Examples of org.apache.solr.client.solrj.SolrServer.deleteById()

        if (operation.equalsIgnoreCase(SolrConstants.OPERATION_INSERT)) {
            insert(exchange, serverToUse);
        } else if (operation.equalsIgnoreCase(SolrConstants.OPERATION_INSERT_STREAMING)) {
            insert(exchange, serverToUse);
        } else if (operation.equalsIgnoreCase(SolrConstants.OPERATION_DELETE_BY_ID)) {
            serverToUse.deleteById(exchange.getIn().getBody(String.class));
        } else if (operation.equalsIgnoreCase(SolrConstants.OPERATION_DELETE_BY_QUERY)) {
            serverToUse.deleteByQuery(exchange.getIn().getBody(String.class));
        } else if (operation.equalsIgnoreCase(SolrConstants.OPERATION_ADD_BEAN)) {
            serverToUse.addBean(exchange.getIn().getBody());
        } else if (operation.equalsIgnoreCase(SolrConstants.OPERATION_COMMIT)) {
View Full Code Here

Examples of org.apache.solr.client.solrj.SolrServer.deleteById()

        if (id.isEmpty()) {
            throw new IllegalArgumentException("The parsed Representation id MUST NOT be empty!");
        }
        SolrServer server = getServer();
        try {
            server.deleteById(id);
            server.commit();
        } catch (SolrServerException e) {
            throw new YardException("Error while deleting document " + id + " from the Solr server", e);
        } catch (IOException e) {
            throw new YardException("Unable to access SolrServer", e);
View Full Code Here

Examples of org.apache.solr.client.solrj.SolrServer.deleteById()

                toRemove.add(id);
            }
        }
        SolrServer server = getServer();
        try {
            server.deleteById(toRemove);
            server.commit();
        } catch (SolrServerException e) {
            throw new YardException("Error while deleting documents from the Solr server", e);
        } catch (IOException e) {
            throw new YardException("Unable to access SolrServer", e);
View Full Code Here

Examples of org.apache.solr.client.solrj.SolrServer.deleteById()

    SolrServer solrServer = SolrCoreManager.getInstance(bundleContext,
        managedSolrServer).getServer(ldProgramName);
    id = ContentItemIDOrganizer.attachBaseURI(id);
    removeEnhancements(id);
    try {
      solrServer.deleteById(id);
      solrServer.commit();
    } catch (SolrServerException e) {
      log.error("Solr Server Exception", e);
      throw new StoreException(e.getMessage(), e);
    } catch (IOException e) {
View Full Code Here

Examples of org.apache.solr.client.solrj.SolrServer.deleteById()

      String id = ContentItemIDOrganizer.attachBaseURI(idList.get(i));
      idList.remove(i);
      idList.add(i, id);
    }
    try {
      solrServer.deleteById(idList);
      solrServer.commit();
    } catch (SolrServerException e) {
      log.error("Solr Server Exception", e);
      throw new StoreException(e.getMessage(), e);
    } catch (IOException e) {
View Full Code Here

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

      setAuthenticationUser("junit");
      List<String> allIds = new ArrayList<String>(NUM_DOCS);
      for (int i = 0; i < NUM_DOCS; ++i) {
        allIds.add(Long.toString(i));
      }
      server.deleteById(allIds);
      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.deleteById()

      // for delete only
     
      List<String> ids = new ArrayList<String>();
      ids.add(127995479 + ""); // term vector didn't get deleted doc id
      ids.add(134876977 + ""); // term vector did get deleted doc id
      solbaseServer.deleteById(ids, true);
    } catch (MalformedURLException e) {

    } catch (SolrServerException e) {
      // TODO Auto-generated catch block
      e.printStackTrace();
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.