lucene-solr-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Shalin Shekhar Mangar <shalinman...@gmail.com>
Subject Re: Why cannot I open a read-only IndexReader from TestHarness.getIndexDir() ?
Date Thu, 14 Jul 2011 20:48:56 GMT
On Thu, Jul 14, 2011 at 1:56 PM, Gabriele Kahlout
<gabriele@mysimpatico.com>wrote:

>  IndexReader getReader() throws CorruptIndexException, IOException {
>        return IndexReader.open(FSDirectory.open(new
> File(h.getCore().getIndexDir())), true);
>    }
>
> *org.apache.lucene.index.IndexNotFoundException: no segments* file found in
> org.apache.lucene.store.NIOFSDirectory@
> /private/var/folders/54/54wUdohaH8eR-mvbJL0l2k+++TI/-Tmp-/solrtest-SolrTestCaseJ4-1310631397578/index
> lockFactory=org.apache.lucene.store.NativeFSLockFactory@62d337d3: files:
> []*
>    at
>
> org.apache.lucene.index.SegmentInfos$FindSegmentsFile.run(SegmentInfos.java:694)
>    at org.apache.lucene.index.DirectoryReader.open(DirectoryReader.java:75)
>    at org.apache.lucene.index.IndexReader.open(IndexReader.java:428)
>    at org.apache.lucene.index.IndexReader.open(IndexReader.java:288)
>    at com.mysimpatico.me.indexplugins.SolrTest.getReader(SolrTest.java:43)
>
> I'm calling it right after a assertU(commit()) and assertQ(req("*:*"),
> getNumFoundXPath(1)) which asserts a document has been indexed.
>
>
I'm not sure but the error indicates that the index does not exist. Perhaps
the path is wrong?

-- 
Regards,
Shalin Shekhar Mangar.

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message