jackrabbit-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mreut...@apache.org
Subject svn commit: r154145 - incubator/jackrabbit/trunk/src/java/org/apache/jackrabbit/core/search/lucene/SearchIndex.java
Date Thu, 17 Feb 2005 09:04:05 GMT
Author: mreutegg
Date: Thu Feb 17 01:04:03 2005
New Revision: 154145

URL: http://svn.apache.org/viewcvs?view=rev&rev=154145
Log:
Fixed order of jcr:score. Ascending now lists lower jcr:score values first. That is, less
relevant first.

Modified:
    incubator/jackrabbit/trunk/src/java/org/apache/jackrabbit/core/search/lucene/SearchIndex.java

Modified: incubator/jackrabbit/trunk/src/java/org/apache/jackrabbit/core/search/lucene/SearchIndex.java
URL: http://svn.apache.org/viewcvs/incubator/jackrabbit/trunk/src/java/org/apache/jackrabbit/core/search/lucene/SearchIndex.java?view=diff&r1=154144&r2=154145
==============================================================================
--- incubator/jackrabbit/trunk/src/java/org/apache/jackrabbit/core/search/lucene/SearchIndex.java
(original)
+++ incubator/jackrabbit/trunk/src/java/org/apache/jackrabbit/core/search/lucene/SearchIndex.java
Thu Feb 17 01:04:03 2005
@@ -213,7 +213,11 @@
         for (int i = 0; i < orderProps.length; i++) {
             String prop = null;
             if (QueryConstants.JCR_SCORE.equals(orderProps[i])) {
-                sortFields[i] = new SortField(null, SortField.SCORE, !orderSpecs[i]);
+                // order on jcr:score does not use the natural order as
+                // implemented in lucene. score ascending in lucene means that
+                // higher scores are first. JCR specs that lower score values
+                // are first.
+                sortFields[i] = new SortField(null, SortField.SCORE, orderSpecs[i]);
             } else {
                 try {
                     prop = orderProps[i].toJCRName(nsMappings);



Mime
View raw message