28 mar 2007 kl. 13.22 skrev mark harwood:

Odd. I'm sure it used to have a getReader method somewhere.

Still, you can use MemoryIndex.createSearcher().getIndexReader()

I've wrapped MemoryIndex in the unison index facade of LUCENE-550, just as I did with all the other index implemementations I could find (RAMDirectory, FSDirectory, MemoryIndex and InstantiatedIndex). It's very simple: an interface containing factory methods for creating IndexReader and IndexWriter so that there is no change to how one communicate with the index, no matter what implementation.

Of course it is completly backwards compatible. I think it would make a lot of sense to push it down to the trunk. It needs to be reviewed though. I could cut that out and place it in a new patch if that would help.

And it makes it really easy to decorate it with layers upon layers with bonus features. I did that too. They are in the same patch. Notifications, auto freshed readers and searchers, search cache, yada yada.

If you ask me, the static methods used when creating readers, opening an index, et c. is pretty darn bad design that makes life really hard unless you implement a formula 1-A solution. "But that's just like your opinion, man."


--
karl

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to