lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Don Gilbert <>
Subject Re: Command Line index browser for 1.4
Date Thu, 20 Oct 2005 19:20:08 GMT


If you don't find another command-line search/index tool for lucene,
you may want to look at these - very no-frills, but they do the job
for me. I've used with lucene 1.9-prerelease only.

= Don Gilbert

> Where can I find a command line index browser like lucli for Lucene 1.4?

  basic, no-frills Lucene searching class
  reads query or commands from stdin or file
  e.g., called from perl module as in/out pipe

  Command-line options are
    [-index <indexpathname>] = pathname of index (default is 'index')
    [-data <command-input>]  = file to read search commands from, otherwise
          use Standard Input

  For each input line, parse search commands.
  Search command line: 'action [:=] parameters'   
      quit                = done searching (or EOF)
      echo blah blah      = echo input line
      fields a,b,c        = set return field(s), default is "contents"
      find lucene-query   = return matches to query
      library index-path  = open another index to search
      terms field-name    = return dictionary table of field values and counts
      max 100             = maximum returned documents (default is all matches)
      debug               = flip debug flag

  Simple usage:
   (echo t name Don Gilbert; echo i type java author; echo k url;\
    echo s contents Don Gilbert, author of LuceGene, LuceneSearcher/Indexer; \
    echo add;\
    echo t name LuceneIndexer; echo i type java class; echo k url;\
    echo s contents LuceneIndexer is a basic Lucene indexing class; \
    echo add;\
    echo t name LuceGene; echo i type java package; echo k url;\
    echo s contents LuceGene is a Genome database search/retrieval tool; \
    echo add;\
   ) | java -cp lib/java:lib/java/lucene.jar LuceneIndexer -create -index indices/lucene/test

   (echo 'fields contents,url'; echo 'find type:java'; ) | \
   java -cp lib/java:lib/java/lucene.jar LuceneSearcher -index indices/lucene/test
  compile: javac -classpath .:$javapath/lucene.jar Lucene*.java
  See also,,
  Don Gilbert; aug 2005;

-- d.gilbert--bioinformatics--indiana-u--bloomington-in-47405

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message