]
Sanne Grinovero resolved HSEARCH-450.
-------------------------------------
Resolution: Fixed
Fix Version/s: 3.2.0.Beta2
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
Fix For: 3.2.0.Beta2
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: