[jboss-cvs] JBossAS SVN: r95879 - projects/docs/enterprise/5.0/Hibernate/Hibernate_Search/en-US.

jboss-cvs-commits at lists.jboss.org jboss-cvs-commits at lists.jboss.org
Fri Oct 30 23:27:41 EDT 2009


Author: laubai
Date: 2009-10-30 23:27:41 -0400 (Fri, 30 Oct 2009)
New Revision: 95879

Modified:
   projects/docs/enterprise/5.0/Hibernate/Hibernate_Search/en-US/configuration.xml
   projects/docs/enterprise/5.0/Hibernate/Hibernate_Search/en-US/getting-started.xml
   projects/docs/enterprise/5.0/Hibernate/Hibernate_Search/en-US/mapping.xml
   projects/docs/enterprise/5.0/Hibernate/Hibernate_Search/en-US/query.xml
Log:
Added changes for JBPAPP-2975.

Modified: projects/docs/enterprise/5.0/Hibernate/Hibernate_Search/en-US/configuration.xml
===================================================================
--- projects/docs/enterprise/5.0/Hibernate/Hibernate_Search/en-US/configuration.xml	2009-10-31 02:49:37 UTC (rev 95878)
+++ projects/docs/enterprise/5.0/Hibernate/Hibernate_Search/en-US/configuration.xml	2009-10-31 03:27:41 UTC (rev 95879)
@@ -88,7 +88,7 @@
             FSDirectoryProvider. It also copies the index to a source
             directory (aka copy directory) on a regular basis.
             </para><para>The recommended value for the refresh period is (at
-            least) 50% higher that the time to copy the information (default
+            least) 50% higher than the time to copy the information (default
             3600 seconds - 60 minutes).</para><para>Note that the copy is
             based on an incremental copy mechanism reducing the average copy
             time.</para><para>DirectoryProvider typically used on the master
@@ -121,7 +121,7 @@
             FSDirectoryProvider, but retrieves a master version (source) on a
             regular basis. To avoid locking and inconsistent search results, 2
             local copies are kept. </para><para>The recommended value for the
-            refresh period is (at least) 50% higher that the time to copy the
+            refresh period is (at least) 50% higher than the time to copy the
             information (default 3600 seconds - 60 minutes).</para><para>Note
             that the copy is based on an incremental copy mechanism reducing
             the average copy time.</para><para>DirectoryProvider typically
@@ -483,7 +483,7 @@
       <para>A file system local copy is recommended for faster search
       results.</para>
 
-      <para>The refresh period should be higher that the expected time
+      <para>The refresh period should be higher than the expected time
       copy.</para>
     </section>
 
@@ -515,7 +515,7 @@
 #Backend is the default lucene one</programlisting>
       </example>
 
-      <para>The refresh period should be higher that the expected time
+      <para>The refresh period should be higher than the expected time
       copy.</para>
 
       <para>In addition to the Hibernate Search framework configuration, a

Modified: projects/docs/enterprise/5.0/Hibernate/Hibernate_Search/en-US/getting-started.xml
===================================================================
--- projects/docs/enterprise/5.0/Hibernate/Hibernate_Search/en-US/getting-started.xml	2009-10-31 02:49:37 UTC (rev 95878)
+++ projects/docs/enterprise/5.0/Hibernate/Hibernate_Search/en-US/getting-started.xml	2009-10-31 03:27:41 UTC (rev 95879)
@@ -496,7 +496,7 @@
       <programlisting>
 EntityManager em = entityManagerFactory.createEntityManager();
 FullTextEntityManager fullTextEntityManager = 
-    org.hibernate.hibernate.search.jpa.Search.getFullTextEntityManager(em);
+    org.hibernate.search.jpa.Search.getFullTextEntityManager(em);
 em.getTransaction().begin();
 
 // create native Lucene query

Modified: projects/docs/enterprise/5.0/Hibernate/Hibernate_Search/en-US/mapping.xml
===================================================================
--- projects/docs/enterprise/5.0/Hibernate/Hibernate_Search/en-US/mapping.xml	2009-10-31 02:49:37 UTC (rev 95878)
+++ projects/docs/enterprise/5.0/Hibernate/Hibernate_Search/en-US/mapping.xml	2009-10-31 03:27:41 UTC (rev 95879)
@@ -1367,7 +1367,7 @@
     private String network;
     private String branchHead;
     private String branch;
-    private Integer maxEmployees
+    private Integer maxEmployees;
     ...
 }
 

Modified: projects/docs/enterprise/5.0/Hibernate/Hibernate_Search/en-US/query.xml
===================================================================
--- projects/docs/enterprise/5.0/Hibernate/Hibernate_Search/en-US/query.xml	2009-10-31 02:49:37 UTC (rev 95878)
+++ projects/docs/enterprise/5.0/Hibernate/Hibernate_Search/en-US/query.xml	2009-10-31 03:27:41 UTC (rev 95879)
@@ -272,10 +272,10 @@
 query.<emphasis role="bold">setProjection( "id", "summary", "body", "mainAuthor.name" )</emphasis>;
 List results = query.list();
 Object[] firstResult = (Object[]) results.get(0);
-Integer id = firstResult[0];
-String summary = firstResult[1];
-String body = firstResult[2];
-String authorName = firstResult[3];</programlisting>
+  Integer id = (Integer) firstResult[0];
+  String summary = (String) firstResult[1];
+  String body = (String) firstResult[2];
+  String authorName = (String) firstResult[3]; </programlisting>
         </example>
 
         <para>Hibernate Search extracts the properties from the Lucene index
@@ -325,9 +325,9 @@
 query.<emphasis role="bold">setProjection( FullTextQuery.SCORE, FullTextQuery.THIS, "mainAuthor.name" )</emphasis>;
 List results = query.list();
 Object[] firstResult = (Object[]) results.get(0);
-float score = firstResult[0];
-Book book = firstResult[1];
-String authorName = firstResult[2];</programlisting>
+  float score = (Float) firstResult[0];
+  Book book = (Book) firstResult[1];
+  String authorName = (String) firstResult[2]; </programlisting>
         </example>
 
         <para>You can mix and match regular fields and special placeholders.
@@ -449,7 +449,7 @@
 assert 3245 == <emphasis role="bold">query.getResultSize()</emphasis>; //return the number of matching books without loading a single one
 
 org.hibernate.search.FullTextQuery query = s.createFullTextQuery( luceneQuery, Book.class );
-query.setMaxResult(10);
+query.setMaxResults(10);
 List results = query.list();
 assert 3245 == <emphasis role="bold">query.getResultSize()</emphasis>; //return the total number of matching books regardless of pagination</programlisting>
       </example>
@@ -477,7 +477,7 @@
 query.setProjection( "title", "mainAuthor.name" );
 
 <emphasis role="bold">query.setResultTransformer( 
-    new StaticAliasToBeanResultTransformer( BookView.class, "title", "author" ) 
+    new AliasToBeanResultTransformer( BookView.class ) 
 );</emphasis>
 List&lt;BookView&gt; results = (List&lt;BookView&gt;) query.list();
 for(BookView view : results) {
@@ -535,7 +535,7 @@
 @SuppressWarnings("unchecked") List&lt;Object[]&gt; results = ftQuery.list();
 for (Object[] result : results) {
     Explanation e = (Explanation) result[1];
-    display( e.toString() );
+    System.out.println( e.toString() );
 }</programlisting>
       </example>
 




More information about the jboss-cvs-commits mailing list