[hibernate-commits] Hibernate SVN: r20261 - search/trunk/hibernate-search/src/main/docbook/en-US/modules.

hibernate-commits at lists.jboss.org hibernate-commits at lists.jboss.org
Wed Aug 25 09:52:12 EDT 2010


Author: epbernard
Date: 2010-08-25 09:52:12 -0400 (Wed, 25 Aug 2010)
New Revision: 20261

Modified:
   search/trunk/hibernate-search/src/main/docbook/en-US/modules/query.xml
Log:
HSEARCH-588 Fix incorrect query DSL examples

Modified: search/trunk/hibernate-search/src/main/docbook/en-US/modules/query.xml
===================================================================
--- search/trunk/hibernate-search/src/main/docbook/en-US/modules/query.xml	2010-08-25 10:33:27 UTC (rev 20260)
+++ search/trunk/hibernate-search/src/main/docbook/en-US/modules/query.xml	2010-08-25 13:52:12 UTC (rev 20261)
@@ -448,7 +448,7 @@
 Date beforeChrist = ...;
 Query luceneQuery = mythQB
     .range()
-    .onField("starred")
+    .onField("creationDate")
     .below(beforeChrist).excludeLimit()
     .createQuery();</programlisting>
 
@@ -481,9 +481,14 @@
       .must( mythQB.keyword().onField("description").matching("urban").createQuery() )
         .not()
       .must( mythQB.range().onField("starred").above(4).createQuery() )
+      .must( mythQB
+        .range()
+        .onField("creationDate")
+        .above(twentiethCentury)
+        .createQuery() )
     .createQuery();
 
-//look for myths that are preferably urban
+//look for popular myths that are preferably urban
 Query luceneQuery = mythQB
     .bool()
       .should( mythQB.keyword().onField("description").matching("urban").createQuery() )



More information about the hibernate-commits mailing list