Package org.apache.solr.client.solrj.impl

Examples of org.apache.solr.client.solrj.impl.HttpSolrServer.commit()


        SolrDocumentList sdl = indexer.getRawData(Constants.ITEM);
        System.out.println("Found " + sdl.getNumFound()
                + " access in the statistics core");
        HttpSolrServer solr = indexer.getSolr();
        indexer.deleteByType(Constants.ITEM);
        solr.commit();
        System.out.println("Remove old data");
        Context context = new Context();
        context.turnOffAuthorisationSystem();
        int i = 0;
        for (SolrDocument sd : sdl)
View Full Code Here


           
            context.removeCached(dso, id);
            solr.add(sdi);
        }
        solr.commit();
        solr.optimize();

        sdl = indexer.getRawData(CrisConstants.RP_TYPE_ID);
        System.out.println("Found " + sdl.getNumFound()
                + " access in the RP statistics core");
View Full Code Here

        sdl = indexer.getRawData(CrisConstants.RP_TYPE_ID);
        System.out.println("Found " + sdl.getNumFound()
                + " access in the RP statistics core");
        HttpSolrServer rpsolr = indexer.getSolr();
        indexer.deleteByType(CrisConstants.RP_TYPE_ID);
        rpsolr.commit();

        System.out.println("Remove old data");
       
        ApplicationService as = dspace.getServiceManager().getServiceByName(
                "applicationService", ApplicationService.class);
View Full Code Here

                        sdi);
            }
          
            rpsolr.add(sdi);
        }
        rpsolr.commit();
        rpsolr.optimize();
    }
}
View Full Code Here

                contentStreamUpdateRequest.setAction(AbstractUpdateRequest.ACTION.COMMIT, true, true);
                contentStreamUpdateRequest.addFile(tempCsv, "text/plain;charset=utf-8");

                statisticsYearServer.request(contentStreamUpdateRequest);
            }
            statisticsYearServer.commit(true, true);


            //Delete contents of this year from our year query !
            solr.deleteByQuery(filterQuery.toString());
            solr.commit(true, true);
View Full Code Here

    Context context = new Context();
    // Find our solr server
    HttpSolrServer solr = new HttpSolrServer(
        ConfigurationManager.getProperty("solr-statistics", "server"));
    solr.deleteByQuery("*:*");
    solr.commit();

    String prevIp = null;
    String dbfile = ConfigurationManager.getProperty("usage-statistics", "dbfile");
    LookupService cl = new LookupService(dbfile,
        LookupService.GEOIP_STANDARD);
View Full Code Here

      // Make sure we have a previous ip
      prevIp = ip;
    }
    System.out.println("Nr of countryErrors: " + countryErrors);
    // Commit at the end cause it takes a while
    solr.commit();
  }

  /**
   * Method returns a random integer between the given int
   *
 
View Full Code Here

      try {
        LOG.info("Committing live merge...");
        if (options.zkHost != null) {
          CloudSolrServer server = new CloudSolrServer(options.zkHost);
          server.setDefaultCollection(options.collection);
          server.commit();
          server.shutdown();
        } else {
          for (List<String> urls : options.shardUrls) {
            for (String url : urls) {
              // TODO: we should do these concurrently
View Full Code Here

        } else {
          for (List<String> urls : options.shardUrls) {
            for (String url : urls) {
              // TODO: we should do these concurrently
              HttpSolrServer server = new HttpSolrServer(url);
              server.commit();
              server.shutdown();
            }
          }
        }
        LOG.info("Done committing live merge");
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.