Warning: This page has not been updated in over over a year and may be outdated or deprecated.
indexing:marc:multiple_configs
Differences
This shows you the differences between two versions of the page.
Next revision | Previous revision | ||
indexing:marc:multiple_configs [2020/10/12 20:36] – created demiankatz | indexing:marc:multiple_configs [2020/10/12 20:58] (current) – demiankatz | ||
---|---|---|---|
Line 3: | Line 3: | ||
There are often situations where you need to apply different configuration settings to different MARC files. For example, if you load files from different libraries, you may wish to use different hard-coded " | There are often situations where you need to apply different configuration settings to different MARC files. For example, if you load files from different libraries, you may wish to use different hard-coded " | ||
- | ===== Understanding | + | ===== SolrMarc Configuration Files ===== |
- | It is important to understand that SolrMarc has two different kinds of configuration files: | + | It is important to understand that SolrMarc has two different kinds of configuration files: |
+ | * the SolrMarc configuration file (called import.properties by default) | ||
+ | * the index specification file (exemplified by marc.properties and marc_local.properties) | ||
+ | The configuration file provides high-level configuration settings for SolrMarc, such as the URL of the Solr instance that will receive MARC records, and the name(s) of index specification file(s) to use. | ||
+ | |||
+ | The index specification file(s) contain the rules for performing the indexing operation. | ||
+ | |||
+ | ===== The -p Switch ===== | ||
+ | |||
+ | The ./ | ||
+ | |||
+ | ===== Configuring Index Specification Files ===== | ||
+ | |||
+ | SolrMarc loads index specification files based on the " | ||
+ | |||
+ | You can include any number of comma-separated filenames here, and they will all be chained together, with later files overriding settings from earlier files. | ||
+ | |||
+ | The solrmarc.path setting lists the directories where SolrMarc will search for the specified filenames; when VuFind' | ||
+ | |||
+ | ===== Example: Putting It All Together ===== | ||
+ | |||
+ | Suppose you have two files: library1.mrc and library2.mrc. When you index library1.mrc, | ||
+ | |||
+ | ==== Step 1: Create the Indexing Specification Files ==== | ||
+ | |||
+ | You'll need to create an indexing specification file for each institution, | ||
+ | |||
+ | $VUFIND_LOCAL_DIR/ | ||
+ | < | ||
+ | institution = " | ||
+ | </ | ||
+ | |||
+ | $VUFIND_LOCAL_DIR/ | ||
+ | < | ||
+ | institution = " | ||
+ | </ | ||
+ | |||
+ | ==== Step 2: Create SolrMarc Configuration Files Pointing to the Index Specification Files ==== | ||
+ | |||
+ | You need a separate SolrMarc configuration for each library that is set up to load the appropriate index specification file. You can create two copies of $VUFIND_LOCAL_DIR/ | ||
+ | |||
+ | $VUFIND_LOCAL_DIR/ | ||
+ | < | ||
+ | ... | ||
+ | solr.indexer.properties = marc.properties, | ||
+ | ... | ||
+ | </ | ||
+ | |||
+ | $VUFIND_LOCAL_DIR/ | ||
+ | < | ||
+ | ... | ||
+ | solr.indexer.properties = marc.properties, | ||
+ | ... | ||
+ | </ | ||
+ | |||
+ | ==== Step 3: Run the Indexing Process ==== | ||
+ | |||
+ | Now you simply need to use the -p switch to specify the correct configuration for each MARC file: | ||
+ | |||
+ | <code bash> | ||
+ | cd $VUFIND_HOME | ||
+ | ./ | ||
+ | ./ | ||
+ | </ | ||
---- struct data ---- | ---- struct data ---- | ||
+ | properties.Page Owner : | ||
---- | ---- | ||
indexing/marc/multiple_configs.1602535001.txt.gz · Last modified: 2020/10/12 20:36 by demiankatz