Package org.apache.solr.client.solrj

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


        } 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_ADD_BEANS)) {
            serverToUse.addBeans(exchange.getIn().getBody(Collection.class));
        } else if (operation.equalsIgnoreCase(SolrConstants.OPERATION_COMMIT)) {
            serverToUse.commit();
        } else if (operation.equalsIgnoreCase(SolrConstants.OPERATION_ROLLBACK)) {
            serverToUse.rollback();
        } else if (operation.equalsIgnoreCase(SolrConstants.OPERATION_OPTIMIZE)) {
View Full Code Here


    @Override
    public boolean saveOrUpdateBeans(List<Serializable> indexBeans) {
        boolean isSuccess = false;
        try {
            SolrServer solrServer = this.getSolrClient();
            solrServer.addBeans(indexBeans);
            solrServer.optimize();
            solrServer.commit();
            logger.info("Add or Update index beans request commit success! " + indexBeans);
            isSuccess = true;
        } catch (SolrServerException 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.