[hibernate-issues] [Hibernate-JIRA] Commented: (HSEARCH-354) Add indexAll method to FullTextSession

Sanne Grinovero (JIRA) noreply at atlassian.com
Tue Apr 14 13:35:17 EDT 2009


    [ http://opensource.atlassian.com/projects/hibernate/browse/HSEARCH-354?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=32875#action_32875 ] 

Sanne Grinovero commented on HSEARCH-354:
-----------------------------------------

Yes I totally agree it's needed, but we are still a bit puzzled about how to do it.
It's scheduled for next release.

> Add indexAll method to FullTextSession
> --------------------------------------
>
>                 Key: HSEARCH-354
>                 URL: http://opensource.atlassian.com/projects/hibernate/browse/HSEARCH-354
>             Project: Hibernate Search
>          Issue Type: Improvement
>            Reporter: Marcel Overdijk
>
> To index all entities by a manual loop it would be more consistent to add an indexAll(Class<T> entityType) method.
> Just like there is a purgeAll method already.
> {code}
> FullTextSession fullTextSession = Search.getFullTextSession(session);
> Transaction tx = fullTextSession.beginTransaction();
> List books = session.createQuery("from Book as book").list();
> for (Book book : books) {
>     fullTextSession.index(book);
> }
> tx.commit(); //index is written at commit time   
> {code}

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://opensource.atlassian.com/projects/hibernate/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        



More information about the hibernate-issues mailing list