<p>This currently isn't possible natively in Craft, but if you think it should be,  you can create a <a href="http://feedback.craftcms.com/" rel="nofollow">feature request</a>!</p>

CC BY-SA 3.0
2016-05-26T18:21:09.653Z
I couldn't find an existing feature request, so... http://feedback.craftcms.com/forums/285221-feature-requests/suggestions/14212509-search-results-included-the-field-that-matched-the
Mike H
CC BY-SA 3.0
2016-06-02T18:49:05.937Z
Here's a plugin to add the matched field and matched value to the results.
https://github.com/composedcreative/craft-expandedsearch
Mike H
CC BY-SA 3.0
2016-04-03T22:05:25.083Z
2016-04-03T22:05:25.083Z
Brad Bell
<p>After a standard search with something like:</p>

<pre><code>{% set results = craft.entries.search( query ) %}
{% for result in results %}
    &lt;ul&gt;
        &lt;li&gt;{{ result.link }}&lt;/li&gt;
    &lt;/ul&gt;
{% endfor %}
</code></pre>

<p>Is there a way to find out which field the query was found in?</p>

<templating><field><search>
Get field that contains search query
# Get field that contains search query

(Asked by: username_0 on 2016-04-01)

After a standard search with something like:
{% set results = craft.entries.search( query ) %}
{% for result in results %}
    
        {{ result.link }}
    
{% endfor %}

Is there a way to find out which field the query was found in?

**Tags:** templating, field, search

---

## 1 answers

### Answer by username_1 on 2016-04-03. Score: 4 | Accepted answer

This currently isn't possible natively in Craft, but if you think it should be, you can create a [feature request](http://feedback.craftcms.com/)!

> **Comments:**
> **username_2**: I couldn't find an existing feature request, so... http://feedback.craftcms.com/forums/285221-feature-requests/suggestions/14212509-search-results-included-the-field-that-matched-the  
> **username_2**: Here's a plugin to add the matched field and matched value to the results. https://github.com/composedcreative/craft-expandedsearch  

---

