<p>You'd have to do the in multiple queries at this point.</p>

<p>Consider voting for this <a href="http://feedback.buildwithcraft.com/forums/285221-feature-requests/suggestions/9505794-all-search-to-work-across-element-types-particul" rel="nofollow">feature request</a>, which is asking for what you're looking for.</p>

CC BY-SA 3.0
2015-10-15T18:27:20.930Z
2015-10-15T18:27:20.930Z
Brad Bell
<p>Is it possible to search through multiple ElementTypes?</p>

<p>Instead of this:</p>

<pre><code>craft()-&gt;elements-&gt;getCriteria(ElementType::Entry)-&gt;limit(10)-&gt;search('Test');
</code></pre>

<p>Doing something like this:</p>

<pre><code>craft()-&gt;elements-&gt;getCriteria(ElementType::Entry, ElementType::Asset, ElementType::Category)-&gt;limit(10)-&gt;search('Test');
</code></pre>

<plugin-development><search><elementcriteriamodel>
Search through multiple ElementTypes
# Search through multiple ElementTypes

(Asked by: username_0 on 2015-10-15)

Is it possible to search through multiple ElementTypes?
Instead of this:
craft()->elements->getCriteria(ElementType::Entry)->limit(10)->search('Test');

Doing something like this:
craft()->elements->getCriteria(ElementType::Entry, ElementType::Asset, ElementType::Category)->limit(10)->search('Test');

**Tags:** plugin-development, search, elementcriteriamodel


---

## 1 answers

### Answer by username_1 on 2015-10-15. Score: 0 | Accepted answer

You'd have to do the in multiple queries at this point.

Consider voting for this [feature request](http://feedback.buildwithcraft.com/forums/285221-feature-requests/suggestions/9505794-all-search-to-work-across-element-types-particul), which is asking for what you're looking for.


---

