I need to create dynamic Index Readers based on the user input.
for example
if the user needs to see the records from june 17-june 20
Directory indexFsDir1 =
FSDirectory.getDirectory("C:\\200806\\17\\outgoing1", false);
IndexReader indexIR1 = IndexReader.open(indexFsDir1);
Directory indexFsDir1 =
FSDirectory.getDirectory("C:\\200806\\18\\outgoing1", false);
IndexReader indexIR2 = IndexReader.open(indexFsDir1);
Directory indexFsDir1 =
FSDirectory.getDirectory("C:\\200806\\19\\outgoing1", false);
IndexReader indexIR3 = IndexReader.open(indexFsDir1);
Directory indexFsDir1 =
FSDirectory.getDirectory("C:\\200806\\20\\outgoing1", false);
IndexReader indexIR4 = IndexReader.open(indexFsDir1);
IndexReader[] readArray =
{ indexIR1, indexIR2, indexIR3, indexIR4};
//merged reader
IndexReader mergedReader = new MultiReader(readArray);
IndexSearcher is = new IndexSearcher(mergedReader);
likewise is there any possibility to create Array of Index Readers.
--
View this message in context: http://www.nabble.com/creating-Array-of-IndexReaders-tp18023594p18023594.html
Sent from the Lucene - Java Users mailing list archive at Nabble.com.
---------------------------------------------------------------------
To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org
For additional commands, e-mail: java-user-help@lucene.apache.org