[hibernate-issues] [Hibernate-JIRA] Assigned: (HSEARCH-450) Example 1.9. superfluous hibernate word

Sanne Grinovero (JIRA) noreply at atlassian.com
Thu Jan 28 04:37:29 EST 2010


     [ http://opensource.atlassian.com/projects/hibernate/browse/HSEARCH-450?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Sanne Grinovero reassigned HSEARCH-450:
---------------------------------------

    Assignee: Sanne Grinovero

> Example 1.9. superfluous hibernate word
> ---------------------------------------
>
>                 Key: HSEARCH-450
>                 URL: http://opensource.atlassian.com/projects/hibernate/browse/HSEARCH-450
>             Project: Hibernate Search
>          Issue Type: Bug
>          Components: documentation
>    Affects Versions: 3.2.0.Beta1
>            Reporter: Dmitriy Fundak
>            Assignee: Sanne Grinovero
>            Priority: Minor
>
> Example 1.9, org.hibernate.hibernate should be org.hibernate.
> EntityManager em = entityManagerFactory.createEntityManager();
> FullTextEntityManager fullTextEntityManager = 
>     org.*hibernate.hibernate*.search.jpa.Search.getFullTextEntityManager(em);
> em.getTransaction().begin();
> // create native Lucene query
> String[] fields = new String[]{"title", "subtitle", "authors.name", "publicationDate"};
> MultiFieldQueryParser parser = new MultiFieldQueryParser(fields, new StandardAnalyzer());
> org.apache.lucene.search.Query query = parser.parse( "Java rocks!" );
> // wrap Lucene query in a javax.persistence.Query
> javax.persistence.Query persistenceQuery = fullTextEntityManager.createFullTextQuery(query, Book.class);
> // execute search
> List result = persistenceQuery.getResultList();
> em.getTransaction().commit();
> em.close();

-- 
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