Code Primer
The Top-level classes that run SolrMarc are in the package org.solrmarc.driver
-
Boot.java
-- The top-level Main routine that dynamically loads the required jars, and then call the main routine specified as the first command line argument -
BootableMain.java
-- The base class for main routines that can be called by theBoot
class. Does all of the command-line argument processing, and additional dynamic jar loading. -
ConfigDriver.java
-- A backwards-compatibiity driver program. Reads an old-style config.properties file, and builds the correct command-line to call theIndexDriver
class. -
IndexDriver.java
-- Uses the command-line arguments to create aMarcReader
, a collection ofAbstractValueIndexer
objects, and aSolrProxy
object and then passes them to theIndexer
class. -
Indexer.java
-- The single-threaded reference implementation of the indexing process. Reads a record, builds theSolrInputDocument
, and sends it to theSolrProxy
. -
ThreadedIndexer.java
-- The multi-threaded, producer-consumer implementation of theIndexer
class, AKA where the magic happens. -
MarcReaderThread.java
-- Used byThreadedIndexer
. Reads records, puts them in the readQ queue. -
IndexerWorker.jav
a -- Used byThreadedIndexer
. Takes a record from the readQ queue, processes the index specifications to produce aSolrInputDocument
, puts that in docQ queue. -
ChunkIndexerWorker.java
-- Used byThreadedIndexer
. Takes a chunk ofSolrInputDocuments
from the docQ queue, send them to Solr. -
RecordAndDoc.java
-- Used by the Indexing Queues, consists of aRecord
and aSolrInputDocument
.
The heart of the index specification processing in in the package org.solrmarc.index.indexer
-
ValueIndexerFactory.java
-- The primary driver for reading index specifications, and buildingAbstractValueIndexer
objects. A global singleton instance. -
FullScanner.lex
-- The Jflex specification for the lexical tokenizer of the Index Specification Parser. -
FullConditionalParser.cup
-- The Java Cup specification for the LALR parser generator -
VerboseSymbolFactory.java
-- Used by the parser and scanner in debug mode. -
FullConditionalParser.java
-- generated Java code for the LALR parser. -
FullConditionalScanner.java
-- generated Java code for the JFlex tokenizer. -
FullSym.java
-- generated Java code used by the parser and scanner. -
IndexerSpecException.java
-- A runtime exception that can be used to indicate a problem with the Index Specification -
AbstractValueIndexer.java
-- The abstract class created by the ValueIndexerFactory for each Index Specification. -
MultiValueIndexer.java
-- The concrete implementation of AbstractValueIndexer, consists of a MultiValue Extractor, zero or more MultiValue maps, plus a MultiValue collector.
###Features
###Installing & Configuring
- Simple Installation
- Index Specification File
- Field based specifications
- Conditional specifications
- Mapping values
- Specification Modifiers
- Using Custom Methods
- Pre-defined Custom Methods
###Running SolrMarc
- Command line options
- Other Command line options
- Reading Marc records
- marcreader.properties
- Logging via log4j
###Developing SolrMarc