Warning: This page has not been updated in over over a year and may be outdated or deprecated.
indexing:solrmarc
Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revisionNext revisionBoth sides next revision | ||
indexing:solrmarc [2016/12/16 13:58] – [Customizing Import Mappings] demiankatz | indexing:solrmarc [2020/09/22 14:31] – demiankatz | ||
---|---|---|---|
Line 24: | Line 24: | ||
===== Customizing Translation Maps ===== | ===== Customizing Translation Maps ===== | ||
- | One of the features of SolrMarc is the ability to translate values found in MARC into different strings using translation map files (i.e. language_map.properties). | + | One of the features of SolrMarc is the ability to translate values found in MARC into different strings using translation map files (i.e. language_map.properties). |
Starting with VuFind 1.0RC2, translation maps are found in the import/ | Starting with VuFind 1.0RC2, translation maps are found in the import/ | ||
+ | |||
+ | Starting with VuFind 2.x, translation maps can be overridden in the [[configuration: | ||
Prior to RC2, translation maps are embedded in the SolrMarc .jar file, making them more difficult (but certainly not impossible) to modify. | Prior to RC2, translation maps are embedded in the SolrMarc .jar file, making them more difficult (but certainly not impossible) to modify. | ||
Line 32: | Line 34: | ||
===== Customizing Format Determination ===== | ===== Customizing Format Determination ===== | ||
- | One of the most commonly-requested VuFind customizations involves changing the way record formats are assigned. | + | One of the most commonly-requested VuFind customizations involves changing the way record formats are assigned. The method for this depends on your VuFind version. |
- | By default, formats are generated using the getFormat function built into SolrMarc. | + | ==== VuFind 6.0 and newer ==== |
+ | |||
+ | VuFind 6.0 replaces the getFormat method with getFormats (to return multiple values when appropriate). The advice below for VuFind 4.0 and newer remains relevant; just be sure to override the appropriate method. | ||
+ | |||
+ | ==== VuFind 4.0 and newer ==== | ||
+ | |||
+ | More recent versions of VuFind determine formats using a getFormat function found in [[https:// | ||
+ | |||
+ | - Copy import/ | ||
+ | - If your new custom script returns different values than the old script, or if you want to change the way the existing values are mapped into your index, edit a local copy of the translation map found in import/ | ||
+ | - If SolrMarc has difficulty finding your custom code, you can edit a local copy of import/ | ||
+ | |||
+ | format = custom(edu.myuniversity.index.FormatCalculator), | ||
+ | |||
+ | ==== VuFind 3.x and earlier ==== | ||
+ | |||
+ | By default, formats are generated | ||
- Copy import/ | - Copy import/ | ||
Line 42: | Line 60: | ||
===== Custom Indexing Functions ===== | ===== Custom Indexing Functions ===== | ||
+ | ==== Dynamically-Compiled Java Code ==== | ||
+ | |||
+ | :!: This option is only available in SolrMarc 3.0 and later, but it is usually the preferred option when available. The other three options below are more relevant to SolrMarc 2.x and earlier, and the documentation links they provide may be outdated. | ||
+ | |||
+ | By putting custom Java code in the import/ | ||
+ | |||
+ | See [[indexing: | ||
==== Compiled Custom Functions ==== | ==== Compiled Custom Functions ==== | ||
Line 68: | Line 93: | ||
(just replace " | (just replace " | ||
- | |||
- | Here is the [[http:// | ||
- | |||
===== Pre-Processing Records ===== | ===== Pre-Processing Records ===== |
indexing/solrmarc.txt · Last modified: 2024/02/23 11:34 by demiankatz