:         return IndexReader.open(FSDirectory.open(new
: File(h.getCore().getIndexDir())), true);
:     }
: 
: *org.apache.lucene.index.IndexNotFoundException: no segments* file found in

I haven't dug into it, but i seem to recall that there were some changes a 
while back to the TestHarness and solr base test classes to start using 
Randomized Directory impls that help with verifying the code on more 
varieties of platforms.  I suspect that it's also using a RAM Based 
directories, and that nothing is ever actually getting 
written to the getIndexDir() directory.

IN general, now that multiple types of IndexReader and DirectoryProvider 
factories are supported, you can't (in general) assume that 
SolrCore.getIndexDir() will actually exist (let alone be used)

As a side comment...

You seem to be going out of your way to work arround the abstraction solr 
provides, which isn't really a good idea in Solr, let alone in tests of 
solr.  I smell a probable XY problem...

        http://people.apache.org/~hossman/#xyproblem

...can you explain what your *goal* is (indepentent of the approach you 
are taking to do it), and then maybe folks can make better suggestions 
about a better approach?



-Hoss

Reply via email to