Package org.apache.solr.client.solrj

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


        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

        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

                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

    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

      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

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.