You are here

function hook_apachesolr_confgen_zip_file_alter in Apache Solr Config Generator 7

Same name and namespace in other branches
  1. 6 apachesolr_confgen.api.php \hook_apachesolr_confgen_zip_file_alter()

Alter the downloadable zip file conting all solr config files schema.xml and solrconfig.xml are always included in the files array and should be altered using the dedicated hooks above.

Parameters

array $files: array('file_name' => 'file_content')

string $solr_version: switch to target different solr versions, currently '1.4.x', '3.5.x' and '4.5.x'

1 function implements hook_apachesolr_confgen_zip_file_alter()

Note: this list is generated by pattern matching, so it may include some functions that are not actually implementations of this hook.

apachesolr_confgen_textfiles_apachesolr_confgen_zip_file_alter in apachesolr_confgen_textfiles/apachesolr_confgen_textfiles.module
Implements hook_apachesolr_confgen_zip_file_alter().
1 invocation of hook_apachesolr_confgen_zip_file_alter()
apachesolr_confgen_form_validate in ./apachesolr_confgen.admin.inc
Implements hook_form_validate().

File

./apachesolr_confgen.api.php, line 89
Exposed Hooks in 7.x:

Code

function hook_apachesolr_confgen_zip_file_alter(&$files, $solr_version) {
  $files['synnonyms_en.txt'] = <<<SYNONYMS
# blank lines and lines starting with pound are comments.

#Explicit mappings match any token sequence on the LHS of "=>"
#and replace with all alternatives on the RHS.  These types of mappings
#ignore the expand parameter in the schema.
#Examples:
i-pod, i pod => ipod,
sea biscuit, sea biscit => seabiscuit

#Equivalent synonyms may be separated with commas and give
#no explicit mapping.  In this case the mapping behavior will
#be taken from the expand parameter in the schema.  This allows
#the same synonym file to be used in different synonym handling strategies.
#Examples:
ipod, i-pod, i pod
foozball , foosball
universe , cosmos

# If expand==true, "ipod, i-pod, i pod" is equivalent to the explicit mapping:
ipod, i-pod, i pod => ipod, i-pod, i pod
# If expand==false, "ipod, i-pod, i pod" is equivalent to the explicit mapping:
ipod, i-pod, i pod => ipod

#multiple synonym mapping entries are merged.
foo => foo bar
foo => baz
#is equivalent to
foo => foo bar, baz
SYNONYMS;
}