About Features Downloads Getting Started Documentation Events Support GitHub

Love VuFind®? Consider becoming a financial supporter. Your support helps build a better VuFind®!

Site Tools


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.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
Next revisionBoth sides next revision
indexing:solrmarc [2018/03/05 14:50] – [VuFind 4.0 and newer] demiankatzindexing:solrmarc [2019/05/16 18:43] – [VuFind 4.0 and newer] demiankatz
Line 36: Line 36:
 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. 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.
  
-==== VuFind 4.0 and newer ====+==== VuFind 6.0 and newer ====
  
-More recent versions of VuFind determine formats using a getFormat function found in [[https://github.com/vufind-org/vufind/blob/master/import/index_java/src/org/vufind/index/FormatCalculator.java|FormatCalculator.java]]. You can override this file in your [[configuration:local_settings_directory|local settings directory]] to adjust the behavior.+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 3.and earlier ====+==== VuFind 4.and newer ====
  
-By default, formats are generated in older versions of VuFind using the getFormat function built into SolrMarc However, the logic used by getFormat is also replicated in a BeanShell script packaged with VuFind.  If you want to customize the behavior, here are the steps to follow:+More recent versions of VuFind determine formats using getFormat function found in [[https://github.com/vufind-org/vufind/blob/master/import/index_java/src/org/vufind/index/FormatCalculator.java|FormatCalculator.java]]. You can override this file in your [[configuration:local_settings_directory|local settings directory]] to adjust the behavior.
  
   - Copy import/index_java/src/org/vufind/index/FormatCalculator.java into the import/index_java/src/edu/myuniversity/index (replacing edu/myuniversity with an appropriate domain for your institution) subdirectory of your [[configuration:local_settings_directory|local settings directory]] and edit it to customize the behavior as needed.  Be sure to adjust the package declaration at the top of the file to match the directory path you created, so you can differentiate your local indexing class from the core one. The MARC access is accomplished with the [[http://marc4j.tigris.org/|MARC4J]] library.   - Copy import/index_java/src/org/vufind/index/FormatCalculator.java into the import/index_java/src/edu/myuniversity/index (replacing edu/myuniversity with an appropriate domain for your institution) subdirectory of your [[configuration:local_settings_directory|local settings directory]] and edit it to customize the behavior as needed.  Be sure to adjust the package declaration at the top of the file to match the directory path you created, so you can differentiate your local indexing class from the core one. The MARC access is accomplished with the [[http://marc4j.tigris.org/|MARC4J]] library.
indexing/solrmarc.txt · Last modified: 2024/02/23 11:34 by demiankatz