Index: bin/nutch
===================================================================
--- bin/nutch	(revision 425510)
+++ bin/nutch	(working copy)
@@ -154,6 +154,8 @@
   CLASS=org.apache.nutch.parse.ParseSegment
 elif [ "$COMMAND" = "readdb" ] ; then
   CLASS=org.apache.nutch.crawl.CrawlDbReader
+elif [ "$COMMAND" = "searchindex" ] ; then
+  CLASS=org.apache.nutch.tools.CommandLineSearch
 elif [ "$COMMAND" = "mergedb" ] ; then
   CLASS=org.apache.nutch.crawl.CrawlDbMerger
 elif [ "$COMMAND" = "readlinkdb" ] ; then
Index: src/java/org/apache/nutch/tools/CommandLineSearch.java
===================================================================
--- src/java/org/apache/nutch/tools/CommandLineSearch.java	(revision 0)
+++ src/java/org/apache/nutch/tools/CommandLineSearch.java	(revision 0)
@@ -0,0 +1,44 @@
+package org.apache.nutch.tools;
+
+import java.io.File;
+
+import org.apache.lucene.analysis.standard.StandardAnalyzer;
+import org.apache.lucene.queryParser.QueryParser;
+import org.apache.lucene.search.Hits;
+import org.apache.lucene.search.IndexSearcher;
+import org.apache.lucene.search.Query;
+import org.apache.lucene.search.Searcher;
+
+/** Tool to allow to search a Lucene index from the command line,
+ *  makes development and testing faster
+ *  usage:   bin/nutch searchindex [index dir] [searchkeyword]
+ *  example: bin/nutch searchindex crawl/index flowers
+ */
+public class CommandLineSearch {
+
+  public static void main(String[] args) throws Exception {
+    String indexPath = args[0];
+    String queryString = args[1];
+
+    // some testing
+    File indexDir = new File(indexPath);
+    File segmentFile = new File (indexPath + "/segments");
+    if (!indexDir.exists() || !indexDir.isDirectory() || !segmentFile.exists() || !segmentFile.isFile()) {
+      throw new Exception("The index directory you provided (" +indexDir.getAbsolutePath() +
+          " does not exist or is not an index directory. Hint: there should be a file called \"segments\"" +
+          "inside of your index directory");
+    }
+
+    Searcher searcher = new IndexSearcher(indexPath);
+    QueryParser parser = new QueryParser("content", new StandardAnalyzer());
+    Query q = parser.parse(queryString);
+    Hits hits = searcher.search(q);
+
+    System.out.println("Search term \"" + queryString + "\" found in document(s):");
+    for (int i = 0; i < hits.length(); i++) {
+      System.out.println(hits.doc(i).get("url") + "; Score: " + hits.score(i));
+    }
+    System.out.println("\n" + hits.length() + " document(s) found");
+    searcher.close();
+  }
+}
