Re: RefCount interface

2011-12-11 Thread Robert Muir
On Sun, Dec 11, 2011 at 2:23 AM, Shai Erera ser...@gmail.com wrote: Hi I would like to introduce a RefCount interface with the methods: incRef(), tryIncRef(), decRef() and getRefCount(). I dunno, I'm not really sure we should encourage adding more reference counting to Lucene (I think we

Re: RefCount interface

2011-12-11 Thread Shai Erera
what's wrong with a RefCount interface, when in practice it won't change any implementation? Shai On Sun, Dec 11, 2011 at 2:48 PM, Robert Muir rcm...@gmail.com wrote: On Sun, Dec 11, 2011 at 2:23 AM, Shai Erera ser...@gmail.com wrote: Hi I would like to introduce a RefCount interface

Re: RefCount interface

2011-12-11 Thread Robert Muir
On Sun, Dec 11, 2011 at 8:16 AM, Shai Erera ser...@gmail.com wrote: I dunno, I'm not really sure we should encourage adding more reference counting to Lucene (I think we should discourage instead!) But we already have (DirectoryTaxonomyReader). Why should we discourage that? Because I think

Re: RefCount interface

2011-12-11 Thread Shai Erera
Because I think we should avoid reference counting in our apis! It doesn't make sense to me. You make it sound like a bad thing. If an object requires reference counting, why do you want to discourage that? I understand why its on IR, but i dont think it should spread. Again, this sounds

Re: RefCount interface

2011-12-11 Thread Robert Muir
On Sun, Dec 11, 2011 at 8:42 AM, Shai Erera ser...@gmail.com wrote: Because indexsearcher is about things like searching and scoring (not opening and closing readers). I'm not sure why you make this distinction. True, it is lighter-weight than IndexReader, but we still have SearcherManager

RE: RefCount interface

2011-12-11 Thread Uwe Schindler
Hi, I would like to introduce a RefCount interface with the methods: incRef(), tryIncRef(), decRef() and getRefCount(). I am +/-0. These methods are already declared today on IndexReader and TaxonomyReader (module/facet), and I see no reason why we wouldn't have an interface for doing

Re: RefCount interface

2011-12-11 Thread Shai Erera
was pointless because you wouldn't need to worry about setting stats on IndexSearcher returned from SearcherManager. And I would still propose to create the RefCount interface, even if we only used ReaderManager, because I am already aware of 3 copies of the same logic that manage IndexSearcher-like

RefCount interface

2011-12-10 Thread Shai Erera
Hi I would like to introduce a RefCount interface with the methods: incRef(), tryIncRef(), decRef() and getRefCount(). These methods are already declared today on IndexReader and TaxonomyReader (module/facet), and I see no reason why we wouldn't have an interface for doing