# How to extend the search on the storefront to search also custom fields?

**URL:** <https://forum.shopware.com/t/how-to-extend-the-search-on-the-storefront-to-search-also-custom-fields/70245>\
**Category:** Programming (EN)\
**Created:** [16. Oktober 2020 um 07:59 UTC](https://forum.shopware.com/t/how-to-extend-the-search-on-the-storefront-to-search-also-custom-fields/70245 "2020-10-16T07:59:40Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![pinakbheed](https://avatars.discourse-cdn.com/v4/letter/p/cc9497/32.png) [@pinakbheed](https://forum.shopware.com/u/pinakbheed)\
**Post date:** [16. Oktober 2020 um 07:59 UTC](https://forum.shopware.com/t/how-to-extend-the-search-on-the-storefront-to-search-also-custom-fields/70245/1 "2020-10-16T07:59:40Z")

</div>

Hi All,

I have a couple of custom fields associated with products. How can I extend the functionality of search so that it also searches if the query text is contained in the custom fields of any product. I need an OR relation, i.e., query text is in either product name, custom field 1, custom field 2.

I read another question in this forum for the same. However, the links were broken and the ProductSearchKeywordIndexer it referred to seems to be depreceated. Could you please tell me how to solve this issue?

---

<div class="post-metadata">

**Author:** ![oliverriske](https://avatars.discourse-cdn.com/v4/letter/o/ebca7d/32.png) [@oliverriske](https://forum.shopware.com/u/oliverriske)\
**Post date:** [16. Oktober 2020 um 08:05 UTC](https://forum.shopware.com/t/how-to-extend-the-search-on-the-storefront-to-search-also-custom-fields/70245/2 "2020-10-16T08:05:58Z")

</div>

We build our own Elasticsearch Index with a scheduled command to use Ekasticsearch also in Community Edition.

Now we a free to search whatever we want with custom logic if we need…

---

<div class="post-metadata">

**Author:** ![pinakbheed](https://avatars.discourse-cdn.com/v4/letter/p/cc9497/32.png) [@pinakbheed](https://forum.shopware.com/u/pinakbheed)\
**Post date:** [16. Oktober 2020 um 08:24 UTC](https://forum.shopware.com/t/how-to-extend-the-search-on-the-storefront-to-search-also-custom-fields/70245/3 "2020-10-16T08:24:31Z")

</div>

Is there a way to do this without building own elasticsearch index? Or is it a necessity?

---

<div class="post-metadata">

**Author:** ![Yvettee](https://avatars.discourse-cdn.com/v4/letter/y/c77e96/32.png) [@Yvettee](https://forum.shopware.com/u/Yvettee)\
**Post date:** [1. Dezember 2020 um 04:56 UTC](https://forum.shopware.com/t/how-to-extend-the-search-on-the-storefront-to-search-also-custom-fields/70245/4 "2020-12-01T04:56:12Z")

</div>

I have searched quite a lot for this fix but for the life of me can’t&nbsp;find&nbsp;it and … I am using Advanced&nbsp;Custom Fields&nbsp;4.4.2 to&nbsp;store&nbsp;a list of business types … with that text in is&nbsp;also&nbsp;(which may not contain the&nbsp;custom field&nbsp;in it). … it pre-indexes your&nbsp;custom fields&nbsp;(and thus keeps your public&nbsp;searches&nbsp;up to speed)&nbsp;[alaskasworld](https://www.alaskasworld.me/)
