<p>You're close! According to <a href="https://craftcms.com/docs/searching" rel="nofollow">the entry on searching in the Craft docs</a>, this should work:</p>

<pre><code>{% set myQuery = craft.entries.section('channelName').limit(null).search('title::C*').order('title') | group('title|first') %}
</code></pre>

<p>Note the format of the search string with a double colon: <code>title::C*</code>.</p>

CC BY-SA 3.0
2016-08-15T13:17:31.903Z
Worked perfectly. Thanks @steve-rowling! I must have just overlooked this option in the list. Late night coding will do just that :)
Nick L.
CC BY-SA 3.0
2016-08-15T09:11:46.353Z
2016-08-15T09:11:46.353Z
Steve Rowling
<p>Changing <code>.search('title:C*')</code> to <code>.search('title::C*')</code> appears to work, on my end – the <code>::</code> essentially tells Craft that there shouldn't be anything in front of the "C".</p>

<p>Also, for this to work you need to <strong>not</strong> have enabled <a href="https://craftcms.com/support/enabling-fuzzy-search-by-default" rel="nofollow">fuzzy search</a> by default.</p>

CC BY-SA 3.0
2016-08-15T13:19:52.713Z
Thanks Mats. It does seem to be working though without any changes to our default fuzzy search setting.
Nick L.
CC BY-SA 3.0
2016-08-15T13:24:48.427Z
Right, I meant that it works unless you've enabled default fuzzy searching, i.e. the vanilla `defaultSearchTermOptions ` configuration will be fine. Poor wording on my part :)
Mats Mikkel Rummelhoff
CC BY-SA 3.0
2016-08-15T13:29:09.883Z
I thought that might have been your intent :) Thanks again.
Nick L.
CC BY-SA 3.0
2016-08-15T13:29:43.807Z
No worries @NickL. :)
Mats Mikkel Rummelhoff
CC BY-SA 3.0
2016-08-15T09:12:41.033Z
2016-08-15T09:12:41.033Z
Mats Mikkel Rummelhoff
<p>We're looking to pull entries from a channel that starts with a specific letter. We've tried using Craft's search option, with <code>'C*'</code>, to pull any title with a word that starts with C. However, it's pulling entries whose second or third words begin with C as well. Is there another route we should consider to achieve this result?</p>

<pre><code>{% set myQuery = craft.entries.section('channelName').limit(null).search('title:C*').order('title') | group('title|first') %}
</code></pre>

<entries><search>
Searching entries by title's first initial only
# Searching entries by title's first initial only

(Asked by: username_0 on 2016-08-15)

We're looking to pull entries from a channel that starts with a specific letter. We've tried using Craft's search option, with 'C*', to pull any title with a word that starts with C. However, it's pulling entries whose second or third words begin with C as well. Is there another route we should consider to achieve this result?
{% set myQuery = craft.entries.section('channelName').limit(null).search('title:C*').order('title') | group('title|first') %}

**Tags:** entries, search


---

## 2 answers

### Answer by username_1 on 2016-08-15. Score: 1

You're close! According to the entry on searching in the Craft docs, this should work:
{% set myQuery = craft.entries.section('channelName').limit(null).search('title::C*').order('title') | group('title|first') %}

Note the format of the search string with a double colon: title::C*.

> **Comments:**
> **username_0**: Worked perfectly. Thanks @steve-rowling! I must have just overlooked this option in the list. Late night coding will do just that :)  

---

### Answer by username_2 on 2016-08-15. Score: 1

Changing `.search('title:C*')` to `.search('title::C*')` appears to work, on my end – the `::` essentially tells Craft that there shouldn't be anything in front of the "C".

Also, for this to work you need to **not** have enabled [fuzzy search](https://craftcms.com/support/enabling-fuzzy-search-by-default) by default.

> **Comments:**
> **username_0**: Thanks Mats. It does seem to be working though without any changes to our default fuzzy search setting.  
> **username_2**: Right, I meant that it works unless you've enabled default fuzzy searching, i.e. the vanilla `defaultSearchTermOptions ` configuration will be fine. Poor wording on my part :)  
> **username_0**: I thought that might have been your intent :) Thanks again.  
> **username_2**: No worries @NickL. :)  

---

