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 14:00] – [Customizing Translation Maps] demiankatz | indexing:solrmarc [2019/05/16 18:43] – [VuFind 4.0 and newer] demiankatz | ||
---|---|---|---|
Line 34: | 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 44: | 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 70: | 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