<p>My answer in that other question was wrong (I've updated it).</p>

<p>As you pointed out, Craft normalizes all search keywords to be lowercase.  Case  sensitive searches <em>would</em> rely on the database's underlying collation if Craft didn't do that normalization first.</p>

<p>Probably worth adding as a <a href="http://feedback.craftcms.com" rel="nofollow noreferrer">feature request</a>, if you think that shouldn't be the default behavior.</p>

CC BY-SA 3.0
2016-11-15T08:17:49.807Z
In my situation, the Client is complaining about the situation, when they want to search for persons by name (e.g. "Lund") but at the same time they get positive results if there is a word starting like the surname. 

Partial fuzzy search has to stay enabled. If the keywords wouldn't be normalized, then it would be possible to differentiate Names from other words. However then it would treat first words in the sentence as names.

Do you have any ideas for this situation?
pauliusef
CC BY-SA 3.0
2016-11-15T21:29:21.863Z
Is the name part of the first name/last name fields in the user account, or are they custom plain text fields.  If the latter, you could use the field specific search syntax... i.e. `lastName::Lund`
Brad Bell
CC BY-SA 3.0
2016-11-17T08:02:46.033Z
The problem is that the name is just part of an article, inside a body text field (rich text type).
pauliusef
CC BY-SA 3.0
2016-11-14T19:27:40.663Z
2016-11-14T19:27:40.663Z
Brad Bell
<p>From Brad's answer to this <a href="https://craftcms.stackexchange.com/questions/8341/is-crafts-search-case-insensitive/17710">question</a> it's obvious that Craft doesn't have a case sensitive search from the start, but he mentions that it depends on MySQL database and table collation. </p>

<p>My question is however related to the way Craft saves keywords in <code>craft_searchindex</code> table. Here they are converted to lowercase. So my question is if there is a way to enable case sensitive search through MySQL collation changes?</p>

<p>My issue is that the client sees an issue when searching for a Persons name in an article content he also finds results which only include words starting the same. However fuzzy search on the right side is needed, so turning it off isn't an option.</p>

<search>
Case sensitive craft.entries.search() in Craft
# Case sensitive craft.entries.search() in Craft

(Asked by: username_0 on 2016-11-14)

From Brad's answer to this [question](https://craftcms.stackexchange.com/questions/8341/is-crafts-search-case-insensitive/17710) it's obvious that Craft doesn't have a case sensitive search from the start, but he mentions that it depends on MySQL database and table collation.

My question is however related to the way Craft saves keywords in `craft_searchindex` table. Here they are converted to lowercase. So my question is if there is a way to enable case sensitive search through MySQL collation changes?

My issue is that the client sees an issue when searching for a Persons name in an article content he also finds results which only include words starting the same. However fuzzy search on the right side is needed, so turning it off isn't an option.

**Tags:** search

---

## 1 answers

### Answer by username_1 on 2016-11-14. Score: 2 | Accepted answer

My answer in that other question was wrong (I've updated it).

As you pointed out, Craft normalizes all search keywords to be lowercase. Case sensitive searches *would* rely on the database's underlying collation if Craft didn't do that normalization first.

Probably worth adding as a [feature request](http://feedback.craftcms.com), if you think that shouldn't be the default behavior.

> **Comments:**
> **username_0**: In my situation, the Client is complaining about the situation, when they want to search for persons by name (e.g. "Lund") but at the same time they get positive results if there is a word starting like the surname.   Partial fuzzy search has to stay enabled. If the keywords wouldn't be normalized, then it would be possible to differentiate Names from other words. However then it would treat first words in the sentence as names.  Do you have any ideas for this situation?  
> **username_1**: Is the name part of the first name/last name fields in the user account, or are they custom plain text fields.  If the latter, you could use the field specific search syntax... i.e. `lastName::Lund`  
> **username_0**: The problem is that the name is just part of an article, inside a body text field (rich text type).  

---

