Author: sannegrinovero
Date: 2009-04-05 13:58:10 -0400 (Sun, 05 Apr 2009)
New Revision: 16262
Modified:
search/branches/Branch_3_1/doc/reference/en/modules/getting-started.xml
search/branches/Branch_3_1/src/java/org/hibernate/search/jpa/FullTextQuery.java
Log:
merging 15845 from trunk (HSEARCH-332 and some other JPA/hibernate mismatch related
documentation fixes)
Modified: search/branches/Branch_3_1/doc/reference/en/modules/getting-started.xml
===================================================================
--- search/branches/Branch_3_1/doc/reference/en/modules/getting-started.xml 2009-04-05
17:49:12 UTC (rev 16261)
+++ search/branches/Branch_3_1/doc/reference/en/modules/getting-started.xml 2009-04-05
17:58:10 UTC (rev 16262)
@@ -477,7 +477,7 @@
// create native Lucene query
String[] fields = new String[]{"title", "subtitle",
"authors.name", "publicationDate"};
MultiFieldQueryParser parser = new MultiFieldQueryParser(fields, new
StandardAnalyzer());
-Query query = parser.parse( "Java rocks!" );
+org.apache.lucene.search.Query query = parser.parse( "Java rocks!" );
// wrap Lucene query in a org.hibernate.Query
org.hibernate.Query hibQuery = fullTextSession.createFullTextQuery(query, Book.class);
@@ -502,18 +502,17 @@
// create native Lucene query
String[] fields = new String[]{"title", "subtitle",
"authors.name", "publicationDate"};
MultiFieldQueryParser parser = new MultiFieldQueryParser(fields, new
StandardAnalyzer());
-Query query = parser.parse( "Java rocks!" );
+org.apache.lucene.search.Query query = parser.parse( "Java rocks!" );
-// wrap Lucene query in a org.hibernate.Query
-org.hibernate.Query hibQuery = fullTextEntityManager.createFullTextQuery(query,
Book.class);
+// wrap Lucene query in a javax.persistence.Query
+javax.persistence.Query persistenceQuery =
fullTextEntityManager.createFullTextQuery(query, Book.class);
// execute search
-List result = hibQuery.list();
+List result = persistenceQuery.getResultList();
em.getTransaction().commit();
em.close();
-
</programlisting>
</example>
</section>
Modified: search/branches/Branch_3_1/src/java/org/hibernate/search/jpa/FullTextQuery.java
===================================================================
---
search/branches/Branch_3_1/src/java/org/hibernate/search/jpa/FullTextQuery.java 2009-04-05
17:49:12 UTC (rev 16261)
+++
search/branches/Branch_3_1/src/java/org/hibernate/search/jpa/FullTextQuery.java 2009-04-05
17:58:10 UTC (rev 16262)
@@ -46,8 +46,8 @@
*
* Caution:
* The number of results might be slightly different from
- * <code>list().size()</code> because list() if the index is
- * not in sync with the database at the time of query.
+ * <code>getResultList().size()</code> because getResultList()
+ * may be not in sync with the database at the time of query.
*/
int getResultSize();
Show replies by date