1. Jonathan Simms
  2. lucener

Commits

Jonathan Simms  committed d1050a1

gahhh, stuff

  • Participants
  • Parent commits 744cafc
  • Branches master

Comments (0)

Files changed (3)

File src/net/freenose/lucener/Default.scala

View file
+package net.freenose.lucener
+
+
+object Default {
+  val IndexDir = "/tmp/lucener-index"
+  val DocsPath = "/Users/slyphon/.weechat/logs"
+}

File src/net/freenose/lucener/IndexFiles.scala

View file
       |in INDEX_PATH that can be searched with SearchFiles
     """.stripMargin
 
-  val DefaultIndexDir = "/tmp/lucener-index"
-  val DefaultDocsPath = "/Users/slyphon/.weechat/logs"
 
   def main(args: Array[String]) {
-    val idx = new IndexFiles(DefaultIndexDir, DefaultDocsPath)
+    val idx = new IndexFiles(Default.IndexDir, Default.DocsPath)
     idx.run()
   }
 }

File src/net/freenose/lucener/SearchFiles.scala

View file
+package net.freenose.lucener
+
+
+class SearchFiles {
+
+}
+
+object SearchFiles {
+  final val Usage =
+    """
+      |Usage: java net.freenose.lucener.SearchFiles [-index dir] [-field f] [-repeat n] [-queries file] [-query string] [-raw] [-paging hitsPerPage]
+    """.stripMargin
+
+  def main(args: Array[String]) {
+//    var index = Default.
+
+    if ((args.length == 0) || args.exists(s => (s == "-h" || s == "-help"))) {
+      println(Usage)
+      System.exit(1)
+    }
+  }
+}