jackrabbit-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mreut...@apache.org
Subject svn commit: r831844 - /jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/query/lucene/SortedLuceneQueryHits.java
Date Mon, 02 Nov 2009 10:20:35 GMT
Author: mreutegg
Date: Mon Nov  2 10:20:35 2009
New Revision: 831844

URL: http://svn.apache.org/viewvc?rev=831844&view=rev
Log:
JCR-2374: Use FieldSelector in Sorted/LuceneQueryHits when reading UUID

Modified:
    jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/query/lucene/SortedLuceneQueryHits.java

Modified: jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/query/lucene/SortedLuceneQueryHits.java
URL: http://svn.apache.org/viewvc/jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/query/lucene/SortedLuceneQueryHits.java?rev=831844&r1=831843&r2=831844&view=diff
==============================================================================
--- jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/query/lucene/SortedLuceneQueryHits.java
(original)
+++ jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/query/lucene/SortedLuceneQueryHits.java
Mon Nov  2 10:20:35 2009
@@ -16,18 +16,18 @@
  */
 package org.apache.jackrabbit.core.query.lucene;
 
-import org.apache.lucene.search.Sort;
+import java.io.IOException;
+import java.util.ArrayList;
+import java.util.List;
+
+import org.apache.jackrabbit.core.id.NodeId;
+import org.apache.lucene.index.IndexReader;
 import org.apache.lucene.search.Query;
-import org.apache.lucene.search.TopFieldDocCollector;
 import org.apache.lucene.search.ScoreDoc;
-import org.apache.lucene.index.IndexReader;
-import org.apache.jackrabbit.core.id.NodeId;
-import org.slf4j.LoggerFactory;
+import org.apache.lucene.search.Sort;
+import org.apache.lucene.search.TopFieldDocCollector;
 import org.slf4j.Logger;
-
-import java.io.IOException;
-import java.util.List;
-import java.util.ArrayList;
+import org.slf4j.LoggerFactory;
 
 /**
  * Wraps a lucene query result and adds a close method that allows to release
@@ -156,7 +156,8 @@
         this.size = collector.getTotalHits();
         ScoreDoc[] docs = collector.topDocs().scoreDocs;
         for (int i = scoreNodes.size(); i < docs.length; i++) {
-            String uuid = reader.document(docs[i].doc).get(FieldNames.UUID);
+            String uuid = reader.document(docs[i].doc,
+                    FieldSelectors.UUID).get(FieldNames.UUID);
             NodeId id = new NodeId(uuid);
             scoreNodes.add(new ScoreNode(id, docs[i].score, docs[i].doc));
         }



Mime
View raw message