Package org.apache.solr.core

Examples of org.apache.solr.core.SolrResourceLoader.openResource()


    SolrResourceLoader loader = new SolrResourceLoader(null, null);
    File f = new File(confDir, "solrconfig.xml");
    String fname = "solr/conf/solrconfig-slave1.xml";
    FileOutputStream out = new FileOutputStream(f);
    IOUtils.copy(loader.openResource(fname), out);
    out.close();
    f = new File(confDir, "schema.xml");
    fname = "solr/conf/schema-binaryfield.xml";
    out = new FileOutputStream(f);
    IOUtils.copy(loader.openResource(fname), out);
View Full Code Here


    IOUtils.copy(loader.openResource(fname), out);
    out.close();
    f = new File(confDir, "schema.xml");
    fname = "solr/conf/schema-binaryfield.xml";
    out = new FileOutputStream(f);
    IOUtils.copy(loader.openResource(fname), out);
    out.close();
    System.setProperty("solr.solr.home", homeDir.getAbsolutePath());
    System.setProperty("solr.data.dir", dataDir.getAbsolutePath());
    System.setProperty("solr.test.sys.prop1", "propone");
    System.setProperty("solr.test.sys.prop2", "proptwo");
View Full Code Here

            final String carrot2ResourcesDir = resourceLoader.getConfigDir()
                + initParams.get(CarrotParams.LEXICAL_RESOURCES_DIR, CARROT_RESOURCES_PREFIX);
            try {
              log.debug("Looking for " + resource + " in "
                  + carrot2ResourcesDir);
              final InputStream resourceStream = resourceLoader
                  .openResource(carrot2ResourcesDir + "/" + resource);
             
              log.info(resource + " loaded from " + carrot2ResourcesDir);
              final IResource foundResource = new IResource() {
                public InputStream open() throws IOException {
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.