Preserve Search Term Casing

Created on 12 December 2024, 26 days ago

Problem/Motivation

When search phrases contain capitalization, the suggested phrase doesn't preserve the case of all words. Only the correctly spelled words preserve the capitalization. It would be great for the capitalization to be preserved like Google does. It looks like solr lowercases all terms, so I'm assuming that is the root cause.

Steps to reproduce

I did a comparison of Google vs Drupal using "General Aid" with different capitalization of letters. Some of these searches are silly (IMO), but there is probably a reason why the casing is what it is on Google. My idea is that capitalization for some words is important in certain situations or languages. Not everything should be lowercase.

Proposed resolution

Preserve the searched casing for misspelled words. Ideally every letter's capitalization would be preserved, but at a minimum the first letter should be preserved.

Remaining tasks

Code. Seems like DidYouMeanSpellCheck.php is the spot that should be tweaked.

User interface changes

none

API changes

none

Data model changes

none

✨ Feature request
Status

Active

Version

4.0

Component

Code

Created by

πŸ‡ΊπŸ‡ΈUnited States nmillin

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Merge Requests

Comments & Activities

Production build 0.71.5 2024