Hmm I've tried starting Solr with no Lucene index in the dataDir.
Here's the Exception I receive when starting Solr and when attempting to
add a document to the core:


2010-03-03 16:44:06,479 [main            ] ERROR
org.apache.solr.core.CoreContainer                  -
java.lang.RuntimeException: java.io.FileNotFoundException: no segments*
file found in
org.apache.lucene.store.simplefsdirect...@c:\ign\test-solr\objectIndex\i
ndex: files:
        at org.apache.solr.core.SolrCore.getSearcher(SolrCore.java:1068)
        at org.apache.solr.core.SolrCore.<init>(SolrCore.java:579)
        at
org.apache.solr.core.CoreContainer.create(CoreContainer.java:428)
        at
org.apache.solr.core.CoreContainer.load(CoreContainer.java:278)
        at
org.apache.solr.core.CoreContainer$Initializer.initialize(CoreContainer.
java:117)
        at
org.apache.solr.servlet.SolrDispatchFilter.init(SolrDispatchFilter.java:
83)
        at
org.mortbay.jetty.servlet.FilterHolder.start(FilterHolder.java:71)
        at
org.mortbay.jetty.servlet.WebApplicationHandler.initializeServlets(WebAp
plicationHandler.java:310)
        at
org.mortbay.jetty.servlet.WebApplicationContext.doStart(WebApplicationCo
ntext.java:509)
        at
org.mortbay.jetty.plus.PlusWebAppContext.doStart(PlusWebAppContext.java:
149)
        at org.mortbay.util.Container.start(Container.java:72)
        at org.mortbay.http.HttpServer.doStart(HttpServer.java:708)
        at org.mortbay.jetty.plus.Server.doStart(Server.java:153)
        at org.mortbay.util.Container.start(Container.java:72)
        at org.mortbay.jetty.plus.Server.main(Server.java:202)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.jav
a:39)
        at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessor
Impl.java:25)
        at java.lang.reflect.Method.invoke(Method.java:597)
        at org.mortbay.start.Main.invokeMain(Main.java:151)
        at org.mortbay.start.Main.start(Main.java:476)
        at org.mortbay.start.Main.main(Main.java:94)
Caused by: java.io.FileNotFoundException: no segments* file found in
org.apache.lucene.store.simplefsdirect...@c:\ign\test-solr\objectIndex\i
ndex: files:
        at
org.apache.lucene.index.SegmentInfos$FindSegmentsFile.run(SegmentInfos.j
ava:655)
        at
org.apache.lucene.index.DirectoryReader.open(DirectoryReader.java:69)
        at
org.apache.lucene.index.IndexReader.open(IndexReader.java:476)
        at
org.apache.lucene.index.IndexReader.open(IndexReader.java:403)
        at
org.apache.solr.core.StandardIndexReaderFactory.newReader(StandardIndexR
eaderFactory.java:38)
        at org.apache.solr.core.SolrCore.getSearcher(SolrCore.java:1057)
        ... 21 more 

Before this point I've been using existing Lucene indexes (created by
the Lucene API) with Solr without a problem.


-----Original Message-----
From: Mark Miller [mailto:markrmil...@gmail.com] 
Sent: Wednesday, March 03, 2010 5:00 PM
To: solr-user@lucene.apache.org
Subject: Re: Can Solr Create New Indexes?

On 03/03/2010 07:56 PM, Thomas Nguyen wrote:
> Is there a setting in the config I can set to have Solr create a new
> Lucene index if the dataDir is empty on startup?  I'd like to open our
> Solr system to allow other developers here to add new cores without
> having to use the Lucene API directly to create the indexes.
>
>
>    
You don't have to use the Lucene API though?

Solr creates the index if its not there ...

-- 
- Mark

http://www.lucidimagination.com




Reply via email to