case sensitive option

This commit is contained in:
Natkeeran 2022-05-02 14:08:03 -04:00
parent 3e3b68c72d
commit 1e698ce6f8
2 changed files with 43 additions and 6 deletions

View file

@ -22,7 +22,7 @@ class SettingsForm extends ConfigFormBase {
const SEARCH_ADD_OPERATOR = 'search_add_operator';
const SEARCH_REMOVE_OPERATOR = 'search_remove_operator';
const FACET_TRUNCATE = 'facet_truncate';
const SOLR_CASE_INSENSITIVE_FIELD_PREFIX = "case_insensitive_solr_field_prefix";
const LUCENE_SEARCH_FLAG = 'lucene_on_off';
const LUCENE_SEARCH_LABEL = 'lucene_label';
@ -103,6 +103,16 @@ class SettingsForm extends ConfigFormBase {
'#min' => 1,
],
],
'solr_case_insensitive_field_prefix' => [
'#type' => 'fieldset',
'#title' => $this->t('Case Insensitive Search'),
self::SOLR_CASE_INSENSITIVE_FIELD_PREFIX => [
'#type' => 'textfield',
'#title' => $this->t('Prefix for Solr Case Insensitive Field'),
'#description' => $this->t('If you have configured case insenstive fields, please specify the prefix here (i.e sss_lowercase_)'),
'#default_value' => self::getConfig(self::SOLR_CASE_INSENSITIVE_FIELD_PREFIX, ""),
],
],
];
$form['lucene'] = [
@ -150,7 +160,7 @@ class SettingsForm extends ConfigFormBase {
->set(self::SEARCH_ADD_OPERATOR, $form_state->getValue(self::SEARCH_ADD_OPERATOR))
->set(self::SEARCH_REMOVE_OPERATOR, $form_state->getValue(self::SEARCH_REMOVE_OPERATOR))
->set(self::FACET_TRUNCATE, $form_state->getValue(self::FACET_TRUNCATE))
->set(self::SOLR_CASE_INSENSITIVE_FIELD_PREFIX, $form_state->getValue(self::SOLR_CASE_INSENSITIVE_FIELD_PREFIX))
->set(self::LUCENE_SEARCH_FLAG, $form_state->getValue(self::LUCENE_SEARCH_FLAG))
->set(self::LUCENE_SEARCH_LABEL, $form_state->getValue(self::LUCENE_SEARCH_LABEL))