diff --git a/src/main/java/net/sf/katta/lib/lucene/LuceneServer.java b/src/main/java/net/sf/katta/lib/lucene/LuceneServer.java
index 5cc6390..c9f08d5 100644
--- a/src/main/java/net/sf/katta/lib/lucene/LuceneServer.java
+++ b/src/main/java/net/sf/katta/lib/lucene/LuceneServer.java
@@ -366,8 +366,6 @@ public class LuceneServer implements IContentServer, ILuceneServer {
     final Query rewrittenQuery = rewrite(query, shards);
     final int numDocs = freqs.getNumDocsAsInteger();
     final Weight weight = rewrittenQuery.weight(new CachedDfSource(freqs.getAll(), numDocs, new DefaultSimilarity()));
-    // Limit the request to the number requested or the total number of
-    // documents, whichever is smaller.
     int totalHits = 0;
     final int shardsCount = shards.length;
 
@@ -399,6 +397,8 @@ public class LuceneServer implements IContentServer, ILuceneServer {
     result.addTotalHits(totalHits);
 
     final Iterable<Hit> finalHitList;
+    // Limit the request to the number requested or the total number of
+    // documents, whichever is smaller.
     int limit = Math.min(numDocs, max);
     if (sort == null || totalHits == 0) {
       final KattaHitQueue hq = new KattaHitQueue(limit);
@@ -540,7 +540,7 @@ public class LuceneServer implements IContentServer, ILuceneServer {
    * Implements a single thread of a search. Each shard has a separate
    * SearchCall and they are run more or less in parallel.
    */
-  private class SearchCall implements Callable<SearchResult> {
+  protected class SearchCall implements Callable<SearchResult> {
 
     private final String _shardName;
     private final Weight _weight;
@@ -593,11 +593,11 @@ public class LuceneServer implements IContentServer, ILuceneServer {
     }
   }
 
-  private static class SearchResult {
+  protected static class SearchResult {
 
-    protected final int _totalHits;
-    protected final ScoreDoc[] _scoreDocs;
-    protected int _taskIndex;
+    public final int _totalHits;
+    public final ScoreDoc[] _scoreDocs;
+    public final int _taskIndex;
 
     public SearchResult(int totalHits, ScoreDoc[] scoreDocs, int taskIndex) {
       _totalHits = totalHits;
@@ -614,7 +614,7 @@ public class LuceneServer implements IContentServer, ILuceneServer {
    * fully-fledged Searcher, but only supports the methods necessary to
    * initialize Weights.
    */
-  private static class CachedDfSource extends Searcher {
+  protected static class CachedDfSource extends Searcher {
 
     private final Map<TermWritable, Integer> dfMap; // Map from Terms to
     // corresponding doc freqs.

