# Excluding a field from being indexed

**URL:** https://discuss.elastic.co/t/excluding-a-field-from-being-indexed/24957
**Category:** Elasticsearch
**Created:** [July 6, 2015, 3:37pm UTC](https://discuss.elastic.co/t/excluding-a-field-from-being-indexed/24957 "2015-07-06T15:37:14Z")
**Posts on this page:** 3
**Page:** 1

<div class="post-metadata">

### Author: ![whgibbo](https://avatars.discourse-cdn.com/v4/letter/w/7ba0ec/32.png) [@whgibbo](https://discuss.elastic.co/u/whgibbo)
#### Post date: [July 6, 2015, 3:37pm UTC](https://discuss.elastic.co/t/excluding-a-field-from-being-indexed/24957/1 "2015-07-06T15:37:14Z")

</div>

Hi,  
I've been playing with Spring Data Elasticsearch and it is working well. However I can't seem to tell it not to index a field using the @Field annotation and keep getting the following error:

```
: object mapping for [xxx] tried to parse field [yyy] as object, but got EOF, has a concrete value been provided to it?

```

The field is a byte[] and I was hoping to get it ignore this field and get a data from another field, which is base64 encoded.

Any thoughts

Thanks

---

<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: [July 8, 2015, 4:22am UTC](https://discuss.elastic.co/t/excluding-a-field-from-being-indexed/24957/2 "2015-07-08T04:22:10Z")

</div>

Can we see the mapping you are using for this?

---

<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: [July 6, 2017, 12:02am UTC](https://discuss.elastic.co/t/excluding-a-field-from-being-indexed/24957/3 "2017-07-06T00:02:59Z")

</div>


