# Enabling Exclusion of Specific Text in Elastic Document Searches

**URL:** <https://discuss.elastic.co/t/enabling-exclusion-of-specific-text-in-elastic-document-searches/332179>\
**Category:** Elasticsearch\
**Created:** [May 2, 2023, 5:53am UTC](https://discuss.elastic.co/t/enabling-exclusion-of-specific-text-in-elastic-document-searches/332179 "2023-05-02T05:53:22Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Henkm](https://avatars.discourse-cdn.com/v4/letter/h/bb73d2/32.png) [@Henkm](https://discuss.elastic.co/u/Henkm)\
**Post date:** [May 2, 2023, 5:53am UTC](https://discuss.elastic.co/t/enabling-exclusion-of-specific-text-in-elastic-document-searches/332179/1 "2023-05-02T05:53:22Z")

</div>

Our platform leverages Elasticsearch technology to enhance search result optimization by analyzing user-uploaded profiles and documents. However, we have identified a data inconsistency issue that is caused by certain information being extracted from the uploaded documents during processing. Is there a solution to exclude specific segments of these documents from being scanned by Elasticsearch?

---

<div class="post-metadata">

**Author:** ![warkolm](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/warkolm/32/39224_2.png) [@warkolm](https://discuss.elastic.co/u/warkolm)\
**Post date:** [May 2, 2023, 9:37am UTC](https://discuss.elastic.co/t/enabling-exclusion-of-specific-text-in-elastic-document-searches/332179/2 "2023-05-02T09:37:22Z")

</div>

Welcome to our community! 😃

There's a few ways to do this;

1. With your ingestion process, if you have access to it
2. You can set mapping templates to tell Elasticsearch to [accept the fields but not make them searchable](https://www.elastic.co/guide/en/elasticsearch/reference/8.7/mapping-index.html)

---

<div class="post-metadata">

**Author:** ![Henkm](https://avatars.discourse-cdn.com/v4/letter/h/bb73d2/32.png) [@Henkm](https://discuss.elastic.co/u/Henkm)\
**Post date:** [May 2, 2023, 10:05am UTC](https://discuss.elastic.co/t/enabling-exclusion-of-specific-text-in-elastic-document-searches/332179/3 "2023-05-02T10:05:37Z")

</div>

Thank you Mark, appreciate the help.

Looking into it now

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)\
**Post date:** [May 30, 2023, 10:06am UTC](https://discuss.elastic.co/t/enabling-exclusion-of-specific-text-in-elastic-document-searches/332179/4 "2023-05-30T10:06:34Z")

</div>

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.
