[
https://hibernate.onjira.com/browse/HSEARCH-499?page=com.atlassian.jira.p...
]
Emmanuel Bernard commented on HSEARCH-499:
------------------------------------------
So based on SAnne's HSEARCH-499 branch (as of today at least :), here are my
comments:
h3. General idea
The general idea looks good and we should pursue it.
h3. MassIndexer API
If we open the API to a generic loader + HQL + possibly in the future DetachedCriteria, I
would like us to have a more fluid approach to set that up than piling up options in
MassIndexer. At least if we make mistakes API wise they would be contained.
Roughly sketched that could look like
{code}
massIndexer
.loadId().withHQL()
.primaryKeyQuery(...)
//should we add fetch size options?
.countQuery(...) //optional
.addQueryParameter(name, value) ...
massIndexer
.loadId()
.withDetachedCriteria(criteria)
//should we add fetch size options?
//query parameters?
massIndexer
.loadId().withCustomStrategy(impl)
{code}
h3. DetachedCriteria
I like the idea of the Criteria or a JP-QL equivalent as we could define the select clause
automatically.
As Sanne pointed out, he needs a detached criteria or a serializable version to be able to
run the query from several threads
h3. The HQL approach
Seems straightforward enough. count could be made optional. And Sanne had an issue with
the MySLQ driver. Would that warrant a more flexible API?
h3. The IdentifierLoadingStrategy
It looks good but I would allow people to receive ids from an outside source, ie. not the
DB via Hibernate ORM.
Receiving a StatelessSession is fine as the implementor can ignore it. But
ScrollableResults is a heavy interface to implement. And most methods will be useless to
us. Maybe returning an interface close to Iterator but with a close() method is the way to
go.
Pass a "filter" query to MassIndexing: index changed entity
based on timestamp
------------------------------------------------------------------------------
Key: HSEARCH-499
URL:
https://hibernate.onjira.com/browse/HSEARCH-499
Project: Hibernate Search
Issue Type: New Feature
Components: massindexer
Reporter: Emmanuel Bernard
Assignee: Sanne Grinovero
Fix For: 4.1.0.CR1
I was discussion the MassIndexer API. It would be nice to be able to filter the list of
Entity ids to reindex based on a query:
For example
select u.id from User u where u.lastUpdate >= :yesterday
or sue some kind of other flag.
This would be a nice useful trick.
--
This message is automatically generated by JIRA.
For more information on JIRA, see:
http://www.atlassian.com/software/jira