Yeah. That makes sense. Its not too hard to wrap those extra steps so I can end up with something simpler too. Like:
iindex = InstantiatedIndex("path/to/my/index") I'm lazy so the intermediate hoops to jump through clutter my code. Hehe. :) Darren On Sun, 2008-11-16 at 11:46 -0500, Mark Miller wrote: > Can you start with an empty index? Then how about: > > // Adding these > > iindex = InstantiatedIndex() > ireader = iindex.indexReaderFactory() > isearcher = IndexSearcher(ireader) > > If you want a copy from another IndexReader though, you have to get that > reader from somewhere right? > > - Mark > > > > Darren Govoni wrote: > > Hi Mark, > > Thanks for the tips. Here's what I will try (psuedo-code) > > > > endirectory = RAMDirectory("index/dictionary.en") > > ensearcher = IndexSearcher(endirectory) > > // Adding these > > reader = ensearcher.getIndexReader() > > iindex = InstantiatedIndex(reader) > > ireader = iindex.indexReaderFactory() > > isearcher = IndexSearcher(ireader) > > > > Kind of round about way to get an InstantiatedIndex I guess,but maybe > > there's a briefer way? > > > > Thank you. > > Darren > > > > On Sun, 2008-11-16 at 10:50 -0500, Mark Miller wrote: > > > >> Check out the docs at: > >> http://lucene.apache.org/java/2_4_0/api/contrib-instantiated/index.html > >> > >> There is a performance graph there to check out. > >> > >> The code should be fairly straightforward - you can make an > >> InstantiatedIndex thats empty, or seed it with an IndexReader. Then you > >> can make an InstantiatedReader or Writer, which take the > >> InstantiatedIndex as a constructor arg. > >> > >> You should be able to just wrap that InstantiatedReader in a regular > >> Searcher. > >> > >> Darren Govoni wrote: > >> > >>> Hi gang, > >>> I am trying to trace the 2.4 API to create an InstantiatedIndex, but > >>> its rather difficult to connect directory,reader,search,index etc just > >>> reading the javadocs. > >>> > >>> I have a (POI - plain old index) directory already and want to > >>> create a faster InstantiatedIndex and IndexSearcher to query it like > >>> before. What's the proper order to do this? > >>> > >>> Also, if anyone has any empirical data on the performance or reliability > >>> of InstantiatedIndex, I'd be curious. > >>> > >>> Thanks for the tips! > >>> Darren > >>> > >>> > >>> --------------------------------------------------------------------- > >>> To unsubscribe, e-mail: [EMAIL PROTECTED] > >>> For additional commands, e-mail: [EMAIL PROTECTED] > >>> > >>> > >>> > >> --------------------------------------------------------------------- > >> To unsubscribe, e-mail: [EMAIL PROTECTED] > >> For additional commands, e-mail: [EMAIL PROTECTED] > >> > >> > > > > > > --------------------------------------------------------------------- > > To unsubscribe, e-mail: [EMAIL PROTECTED] > > For additional commands, e-mail: [EMAIL PROTECTED] > > > > > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]