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

Marcel Overdijk (JIRA) noreply at atlassian.com
Mon Mar 23 17:15:38 EDT 2009


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