[hibernate-dev] [HSEARCH] Extract core of HSEARCH query engine to be independent of Hibernate Core.

Sanne Grinovero sanne at hibernate.org
Wed Feb 23 17:37:01 EST 2011

2011/2/23 Emmanuel Bernard <emmanuel at hibernate.org>:
> On 23 févr. 2011, at 19:43, Sanne Grinovero wrote:
>> I have to add a third point:
>> Infinispan's Query has a "LazyIterator" functionality, which is really
>> lazy (opposing to
>> Search's scrollable result) it expects the IndexSearcher to not be
>> closed while the user iterates,
>> and expects the user to close this.
> Isn't it what ScrollableResultsImpl is all about. ScrollableResultsImpl#close() does close the searcher when the user decides it is done with it.
> HSQuery#getDocumentExtractor() does not close the searcher which is exposed in DocumentExtractor (yes this design sucks).

right, that works.

>> I'm not a big fan for this feature, so for the moment I ported all the
>> rest and all tests are green by just
>> returning a non-lazy iterator:
>> https://github.com/Sanne/infinispan/tree/ISPN-952
>> Options:
>> - drop the feature
>> - expose a similar feature in Hibernate Search, implement it in HSQuery
>> - keep using the non-public "low-level" methods in Query
> which non public method are you talking about?

I was referring mostly the DocumentExtractor and EntityInfo, but
thinking about it that's not so bad.
Will both of them, or an abstraction of them, be available at SPI level?

< cut >

More information about the hibernate-dev mailing list