# Limiting an index to only one field

**URL:** <https://discuss.elastic.co/t/limiting-an-index-to-only-one-field/6523>\
**Category:** Elasticsearch\
**Created:** [January 27, 2012, 11:22am UTC](https://discuss.elastic.co/t/limiting-an-index-to-only-one-field/6523 "2012-01-27T11:22:24Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Daniel\_Gonzalez](https://avatars.discourse-cdn.com/v4/letter/d/ecd19e/32.png) [@Daniel\_Gonzalez](https://discuss.elastic.co/u/Daniel_Gonzalez)\
**Post date:** [January 27, 2012, 11:22am UTC](https://discuss.elastic.co/t/limiting-an-index-to-only-one-field/6523/1 "2012-01-27T11:22:24Z")

</div>

Hello.

I have trouble setting up an index to index only one field from a  
CouchDB river.

It is a very simple use case:

- clean ES installation
- one CouchDB river
- one index
- one mapping with one type, with only one field defined.

This is what I do: [https://gist.github.com/1688268](https://gist.github.com/1688268).

As you can see in a comment attached to the gist, when I do a search I  
see that _all_ fields have been indexed.  
This is not what I want: I only want to index field "note\_text" (which  
is the only one relevant for search).

Thanks,  
Daniel Gonzalez

---

<div class="post-metadata">

**Author:** ![dadoonet](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/dadoonet/32/137187_2.png) [@dadoonet](https://discuss.elastic.co/u/dadoonet)\
**Post date:** [January 27, 2012, 11:27am UTC](https://discuss.elastic.co/t/limiting-an-index-to-only-one-field/6523/2 "2012-01-27T11:27:17Z")

</div>

I think that you should use a script to filter your couchDb document.

See here : [https://github.com/elasticsearch/elasticsearch-river-couchdb/blob/master/README.md](https://github.com/elasticsearch/elasticsearch-river-couchdb/blob/master/README.md)

HTH  
David 😉  
@dadoonet

Le 27 janv. 2012 à 12:22, Daniel Gonzalez [gonvaled@gmail.com](mailto:gonvaled@gmail.com) a écrit :

> Hello.
> 
> I have trouble setting up an index to index only one field from a  
> CouchDB river.
> 
> It is a very simple use case:
> 
> - clean ES installation
> - one CouchDB river
> - one index
> - one mapping with one type, with only one field defined.
> 
> This is what I do: [Setup an Elastic Search index which will index only one field: "note\_text" · GitHub](https://gist.github.com/1688268).
> 
> As you can see in a comment attached to the gist, when I do a search I  
> see that _all_ fields have been indexed.  
> This is not what I want: I only want to index field "note\_text" (which  
> is the only one relevant for search).
> 
> Thanks,  
> Daniel Gonzalez

---

<div class="post-metadata">

**Author:** ![dadoonet](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/dadoonet/32/137187_2.png) [@dadoonet](https://discuss.elastic.co/u/dadoonet)\
**Post date:** [January 27, 2012, 11:28am UTC](https://discuss.elastic.co/t/limiting-an-index-to-only-one-field/6523/3 "2012-01-27T11:28:41Z")

</div>

Or you can define in ES mapping the other fields with store:no index:no and disable source.

David 😉  
@dadoonet

Le 27 janv. 2012 à 12:22, Daniel Gonzalez [gonvaled@gmail.com](mailto:gonvaled@gmail.com) a écrit :

> Hello.
> 
> I have trouble setting up an index to index only one field from a  
> CouchDB river.
> 
> It is a very simple use case:
> 
> - clean ES installation
> - one CouchDB river
> - one index
> - one mapping with one type, with only one field defined.
> 
> This is what I do: [Setup an Elastic Search index which will index only one field: "note\_text" · GitHub](https://gist.github.com/1688268).
> 
> As you can see in a comment attached to the gist, when I do a search I  
> see that _all_ fields have been indexed.  
> This is not what I want: I only want to index field "note\_text" (which  
> is the only one relevant for search).
> 
> Thanks,  
> Daniel Gonzalez

---

<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, 3:41am UTC](https://discuss.elastic.co/t/limiting-an-index-to-only-one-field/6523/4 "2017-07-06T03:41:17Z")

</div>


