<p>This currently isn't possible with Craft's native search solution.</p>

<p>Element IDs aren't indexed in the <code>craft_searchindex</code> table in the database.</p>

<p>As a workaround you could maybe use the <a href="https://github.com/aelvan/Preparse-Field-Craft" rel="nofollow noreferrer">Preparse</a> plugin to copy the entry ID into a custom field called "entryId" so you could search via <code>entryId:####</code>.</p>

CC BY-SA 3.0
2017-09-01T21:55:20.340Z
are there other solutions you know of?
outline4
CC BY-SA 3.0
2017-09-01T21:57:46.350Z
Updated answer.
Brad Bell
CC BY-SA 3.0
2017-09-01T21:58:19.663Z
I thought of giving it a try with the preparse field and save the Id to a field. That should work, not?
outline4
CC BY-SA 3.0
2017-09-01T21:58:54.450Z
ha ha, we were posting the same idea at the same time :) thanks! I'll try that!
outline4
CC BY-SA 3.0
2017-09-01T18:36:15.257Z
2017-09-01T21:57:31.600Z
2017-09-01T21:57:31.600Z
Brad Bell
<p>A customer of mine has printed references of the entry Ids of their product. Now they want to have a search form on their website where it's possible to search either by the name or by entry Ids.</p>

<p>How can you search for an entry id and other fields at the same time in a search form?  </p>

<search>
Search for the entry Id with the search form
# Search for the entry Id with the search form

(Asked by: username_0 on 2017-09-01)

A customer of mine has printed references of the entry Ids of their product. Now they want to have a search form on their website where it's possible to search either by the name or by entry Ids.

How can you search for an entry id and other fields at the same time in a search form?

**Tags:** search


---

## 1 answers

### Answer by username_1 on 2017-09-01. Score: 2

This currently isn't possible with Craft's native search solution.

Element IDs aren't indexed in the `craft_searchindex` table in the database.

As a workaround you could maybe use the [Preparse](https://github.com/aelvan/Preparse-Field-Craft) plugin to copy the entry ID into a custom field called "entryId" so you could search via `entryId:####`.

> **Comments:**
> **username_0**: are there other solutions you know of?  
> **username_1**: Updated answer.  
> **username_0**: I thought of giving it a try with the preparse field and save the Id to a field. That should work, not?  
> **username_0**: ha ha, we were posting the same idea at the same time :) thanks! I'll try that!  

---

