From 8c76956b4e4f61f614c0a3cb5511d978c032d15e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andr=C3=A9=20Lahmann?= <lahmann@ub.uni-leipzig.de> Date: Tue, 25 Apr 2023 14:30:31 +0200 Subject: [PATCH] * add missing searchspecs.yaml documentation to finc searchspecs.yaml --- local/config/vufind/searchspecs.yaml | 29 ++++++++++++++++++++++++++-- 1 file changed, 27 insertions(+), 2 deletions(-) diff --git a/local/config/vufind/searchspecs.yaml b/local/config/vufind/searchspecs.yaml index 9e25158349c..47072b6732d 100644 --- a/local/config/vufind/searchspecs.yaml +++ b/local/config/vufind/searchspecs.yaml @@ -4,7 +4,8 @@ # Format is: # searchType: # # CustomMunge is an optional section to define custom pre-processing of -# # user input. See below for details of munge actions. +# # user input when Dismax does not apply. See below for details of +# # munge actions. # CustomMunge: # MungeName1: # - [action1, actionParams] @@ -12,6 +13,15 @@ # - [action3, actionParams] # MungeName2: # - [action1, actionParams] +# # While CustomMunge only applies to Lucene search, DismaxMunge is a +# # counterpart that applies to Dismax and eDismax queries. DismaxMunge +# # contains a chain of custom munge operations as described below. Note +# # that using this function is NOT RECOMMENDED if you can accomplish your +# # goals more elegantly through Solr schema adjustments, but it may be +# # useful in some situations, such as when you are connecting to a Solr +# # instance that is beyond your direct control. Here is an example stanza: +# DismaxMunge: +# - [preg_replace, '/^.*$/', '"$1"'] # # DismaxFields is optional and defines the fields sent to the Dismax handler # # when we are able to use it. QueryFields will be used for advanced # # searches that Dismax cannot support. QueryFields is always used if no @@ -114,7 +124,7 @@ # #----------------------------------------------------------------------------------- # -# Munge types are based on the original Solr.php code, and consist of: +# Munge types are string manipulation rules, and consist of: # # onephrase: eliminate all quotes and do it as a single phrase. # testing "one two" @@ -145,13 +155,28 @@ # [preg_replace, pattern, replacement] - Perform a regular expression replace # using the preg_replace() PHP function. If you use backreferences in your # replacement phrase, be sure to escape dollar signs (i.e. \$1, not $1). +# [ucfirst] - Uppercase the first letter of each word in the string # [uppercase] - Convert string to uppercase # # See the CallNumber search below for an example of custom munging in action. +# #----------------------------------------------------------------------------------- +# +# Note that you may create a "@parent_yaml" entry at the very top of the file to +# inherit sections from another file. For example: "@parent_yaml": "../../../config/vufind/searchspecs.yaml" +# Only sections not found in this file will be loaded in from the parent file. +# In some complex scenarios, this can be a useful way of sharing settings +# between multiple configured VuFind instances. You can create a chain of parent +# files if necessary. +# +# If @parent_yaml cannot be accessed as an absolute path, it will also be tried +# relative to the path of the file defining it. +# +#----------------------------------------------------------------------------------- + # These searches use Dismax when possible: Author: DismaxParams: -- GitLab