

README

This is the README file for two Java programs called Index and Search.

Index and Search are my first (real) Java programs. Using Marc4J, Index
reads a set of MARC records, parses them (for authors, titles, and call
numbers), and feeds the data to Lucene for indexing. To get the program
going you will need to:

  1. Get the MARC4J .jar files [1], and make sure they are in your CLASSPATH.
  2. Get the Lucene .jar files [2], and make sure they are in your CLASSPATH.
  3. Edit Index.java so the value of InputStream points to a set of MARC records.
  4. Create a directory named index in the same directory as the source code.
  5. Compile the source (javac Index.java).
  6. Run the program (java Index).

The program should echo the parsed data to the screen and create an
index in the index directory. It takes me about fifteen minutes to index
700,000 records.

The second program, Search, is designed to query the index created by
the first program. To get it to run you will need to:

  1. Get the Lucene .jar files [2], and make sure they are in your CLASSPATH.
  2. Make sure the index created by Index is located in the same directory as
     the source code.
  3. Compile the source (javac Search.java).
  4. Run the program (java Search <query> where <query> is a word or phrase).

The result should be a list items from the index. Simple.

I know these to program are not rocket science, but that's the really
the whole point. Instead, consider doing some rocket science (or even
brain surgery) the these applications as frameworks for you cool "next
generation" library catalog system.

These programs are distributed under the GNU General Public License.

[1] MARC4J - http://marc4j.tigris.org/
[2] Lucene - http://lucene.apache.org/

-- 
Eric Lease Morgan
July 9, 2008

