Java Mailing List Archive

http://www.gg3721.com/

Home » Hibernate Commits List »

[hibernate-commits] Hibernate SVN: r14890 - in search/trunk:
 src/java/org/hibernate/search and 1 other directory.

hibernate-commits

2008-07-08


Author LoginPost Reply
Author: epbernard
Date: 2008-07-08 09:00:08 -0400 (Tue, 08 Jul 2008)
New Revision: 14890

Modified:
 search/trunk/doc/reference/en/modules/query.xml
 search/trunk/src/java/org/hibernate/search/ProjectionConstants.java
Log:
HSEARCH-229 deprecate FullTextQuery.BOOST

Modified: search/trunk/doc/reference/en/modules/query.xml
===================================================================
--- search/trunk/doc/reference/en/modules/query.xml  2008-07-08 10:28:25 UTC (rev 14889)
+++ search/trunk/doc/reference/en/modules/query.xml  2008-07-08 13:00:08 UTC (rev 14890)
@@(protected) @@
     them:</para>

     <programlisting>org.hibernate.search.FullTextQuery query = s.createFullTextQuery( luceneQuery, Book.class );
-query.<emphasis role="bold">setProjection( FullTextQuery.SCORE, FullTextQuery.BOOST, FullTextQuery.THIS, "mainAuthor.name" )</emphasis>;
+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];
-float boost = firstResult[1];
-Book book = firstResult[2];
-String authorName = firstResult[3];</programlisting>
+Book book = firstResult[1];
+String authorName = firstResult[2];</programlisting>

     <para>You can mix and match regular fields and special placeholders.
     Here is the list of available placeholders:</para>
@@(protected) @@
      </listitem>

      <listitem>
-        <para>FullTextQuery.BOOST: the boost value of the Lucene
-        Document</para>
-       </listitem>
-
-       <listitem>
        <para>FullTextQuery.ID: the id property value of the projected
        object</para>
      </listitem>

Modified: search/trunk/src/java/org/hibernate/search/ProjectionConstants.java
===================================================================
--- search/trunk/src/java/org/hibernate/search/ProjectionConstants.java  2008-07-08 10:28:25 UTC (rev 14889)
+++ search/trunk/src/java/org/hibernate/search/ProjectionConstants.java  2008-07-08 13:00:08 UTC (rev 14890)
@@(protected) @@
 public String SCORE = "__HSearch_Score";
 /**
  * The boost value of the Lucene document.
+   * @deprecated always return 1
  */
 public String BOOST = "__HSearch_Boost";
 /**

_______________________________________________
hibernate-commits mailing list
hibernate-commits@(protected)
https://lists.jboss.org/mailman/listinfo/hibernate-commits
©2008 gg3721.com - Jax Systems, LLC, U.S.A.