I have and index created using solr DIH. I want to query that index data using the Lucene.net library.
the path of solr index is D:\Tests\solr\example\example-DIH\solr\db\data\index
the code I use to create lucene index directory object is as follows:
Analyzer anz = new StandardAnalyzer();
Directory dir =
FSDirectory.GetDirectory(@"D:\Tests\solr\example\example DIH\solr\db\data\index", false);
IndexSearcher isearcher = new IndexSearcher(dir);
while executing the last line of code I get the following exception:
Could not find file 'D:\Tests\solr\example\example-DIH\solr\db\data\index\segments'.
Given that the files within my solr index folder are
- _0.fdt
- _0.fdx
- _0.fnm
- _0.frq
- _0.nrm
- _0.prx
- _0.tii
- _0.tis
- segments.gen
- segments_2
So what is the problem??