Solr wants to keep various data directories like the spellchecking
index, not just the main index. The solr.data.dir option gives the
location of data data/ directory, which defaults under solr/. This
line in solrconfig.xml uses the property:

 <dataDir>${solr.data.dir:./solr/data}</dataDir>

This starts the example solr with a different data directory:

 java -Dsolr.data.dir=/tmp/data -jar start.jar

On Tue, Oct 13, 2009 at 3:36 AM, poeta simbolista
<poetasimboli...@gmail.com> wrote:
>
> Hi,
> I'd want to know how can I get rid of the name of the index.
> By default it is "index", so if I specify working directory, (see code
> below), the index is opened in
> "indexdir"/index.
>
> How can I just specify the index folder?
> Is there a way to change convention - my index is not called "index" so I
> have a big problem there!!
> Thanks a lot, any clue will be welcome.
>  http://xmariachi.blogspot.com Diego
>
> (This code is called with a default CoreContainer)
>
> public static SolrServer getSolrServerConfigured(CoreContainer container,
> String indexdir)
> throws ParserConfigurationException, IOException, SAXException
> {
>        File root = new File(indexdir);
>        SolrConfig config;
>
>        config = new SolrConfig(root.toString(),
>                        "solrconfig.xml",null);
>        CoreDescriptor descriptor = new CoreDescriptor(container,
>                        "embedded", root.toString() );
>        SolrCore core = new SolrCore("embedded", root.toString(),
>                        config, null, descriptor);
>        container.register("embedded", core, false);
>        log.warn(" ---------- SolrCore index on " + core.getIndexDir());
>        EmbeddedSolrServer solr = new EmbeddedSolrServer(container,
>                        "embedded");
>        return solr;
> }
>
> --
> View this message in context: 
> http://www.nabble.com/EmbeddedSolrServer---default-index-name-tp25870498p25870498.html
> Sent from the Solr - User mailing list archive at Nabble.com.
>



-- 
Lance Norskog
goks...@gmail.com

Reply via email to