From 4b55eccea4ce8edb51cb628aa8651911ea14f3e7 Mon Sep 17 00:00:00 2001 From: Paul Pound Date: Fri, 4 Sep 2026 15:02:03 -0300 Subject: [PATCH] =?UTF-8?q?added=20ICUFoldingFilter=20so=20=C3=96konomie?= =?UTF-8?q?=20sorts=20with=20Okonomie?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- README.md | 21 +++++++++++++++---- .../SolrConfigSetSubscriber.php | 17 ++++++++++----- 2 files changed, 29 insertions(+), 9 deletions(-) diff --git a/README.md b/README.md index 8f16aac..bad90e0 100644 --- a/README.md +++ b/README.md @@ -113,10 +113,10 @@ field types do not have to precede the fields that use them. + - @@ -135,7 +135,13 @@ zip: Keep the comment markers — they are what makes the block findable and cleanly removable later. -Both blocks load unchanged on Solr 8.11 and 9.x. +Both blocks load unchanged on Solr 8.11 and 9.x. `ICUFoldingFilterFactory` +needs the ICU analysis jar, but any core running the stock `search_api_solr` +config set already has it — every `collated_*` field type is a +`solr.ICUCollationField` from that same jar, and the core would not load at +all without it. On Solr 8 the config set loads it through the +`contrib/analysis-extras` `` directives; on Solr 9 it comes from +`SOLR_MODULES` including `analysis-extras`. Reload the core: @@ -162,8 +168,15 @@ search view. ## Verifying -At `/solr/#//analysis`, field type `string_sort_ignore_articles` with -input `The !Matrix` should produce the single token `matrix`. +At `/solr/#//analysis`, field type `string_sort_ignore_articles` should +reduce each of these to a single token: + +| Input | Token | Checks | +| --- | --- | --- | +| `The !Matrix` | `matrix` | article and punctuation both stripped | +| `A Tale of Two Cities` | `tale of two cities` | one token, not one per word | +| `Theory of Everything` | `theory of everything` | a word starting with an article is left alone | +| `Ökonomie` | `okonomie` | diacritics folded, so it sorts under O | The field itself can be confirmed with the Schema API: diff --git a/src/EventSubscriber/SolrConfigSetSubscriber.php b/src/EventSubscriber/SolrConfigSetSubscriber.php index f585dec..b4fa213 100644 --- a/src/EventSubscriber/SolrConfigSetSubscriber.php +++ b/src/EventSubscriber/SolrConfigSetSubscriber.php @@ -94,15 +94,22 @@ class SolrConfigSetSubscriber implements EventSubscriberInterface { - + + - + - + - -