MyCoRe-Org/mir-alias-plugin

alias searchfield should be case insensitiv

Closed this issue · 2 comments

You should add LowerCaseFilterFactory

    "filters": [
      {
        "class": "solr.LowerCaseFilterFactory"
      }
    ]

I changed my solr-schema.json this way:

[
  {
    "add-field-type": {
      "name": "mir.alias.string_ci",
      "class": "solr.TextField",
      "analyzer": {
        "tokenizer": {
          "class": "solr.KeywordTokenizerFactory"
        },
        "filters": [
          {
            "class": "solr.LowerCaseFilterFactory"
          }
        ]
      }
    }
  },
  {
    "add-field": {
        "name": "alias",
        "type": "mir.alias.string_ci",
        "indexed": true,
        "stored": true,
        "multiValued": false
    }
  }
]

And now both variants work:
https://reposis-test.gbv.de/repper/publikationen/friedrich300-colloquien/Friedrich-Dynastie/
https://reposis-test.gbv.de/repper/publikationen/friedrich300-colloquien/friedrich-dynastie/

Case sensitive type of solr alias field is comitted into master.
7a8989f