# Removing data fields before indexing with the couchdb river

**URL:** <https://discuss.elastic.co/t/removing-data-fields-before-indexing-with-the-couchdb-river/10894>\
**Category:** Elasticsearch\
**Created:** [February 25, 2013, 10:50pm UTC](https://discuss.elastic.co/t/removing-data-fields-before-indexing-with-the-couchdb-river/10894 "2013-02-25T22:50:19Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![troy](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/troy/32/2547_2.png) [@troy](https://discuss.elastic.co/u/troy)\
**Post date:** [February 25, 2013, 10:50pm UTC](https://discuss.elastic.co/t/removing-data-fields-before-indexing-with-the-couchdb-river/10894/1 "2013-02-25T22:50:19Z")

</div>

I'm storing user data in an application I'm writing in couchdb. I'd like to  
make the user data searchable using ES, but I don't want to include certain  
fields in the data that gets indexed in ES (password, reset password token,  
etc). I'm contemplating using the river plugin, but not sure if it's  
possible to exclude fields from documents before they are indexed? The  
filter section seems to just filter whole documents from being indexed if I  
understand it correctly.

Thanks,

Troy Martin

--  
You received this message because you are subscribed to the Google Groups "elasticsearch" group.  
To unsubscribe from this group and stop receiving emails from it, send an email to [elasticsearch+unsubscribe@googlegroups.com](mailto:elasticsearch+unsubscribe@googlegroups.com).  
For more options, visit [https://groups.google.com/groups/opt\_out](https://groups.google.com/groups/opt_out).

---

<div class="post-metadata">

**Author:** ![drewr](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/drewr/32/7803_2.png) [@drewr](https://discuss.elastic.co/u/drewr)\
**Post date:** [February 25, 2013, 11:13pm UTC](https://discuss.elastic.co/t/removing-data-fields-before-indexing-with-the-couchdb-river/10894/2 "2013-02-25T23:13:59Z")

</div>

[troy@scriptedmotion.com](mailto:troy@scriptedmotion.com) wrote:

> I'm storing user data in an application I'm writing in couchdb. I'd  
> like to make the user data searchable using ES, but I don't want to  
> include certain fields in the data that gets indexed in ES  
> (password, reset password token, etc). I'm contemplating using the  
> river plugin, but not sure if it's possible to exclude fields from  
> documents before they are indexed? The filter section seems to just  
> filter whole documents from being indexed if I understand it  
> correctly.

Have a look at the script filter option in the docs. You can fix up  
the doc however you want before it's passed on.

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

-Drew

--  
You received this message because you are subscribed to the Google Groups "elasticsearch" group.  
To unsubscribe from this group and stop receiving emails from it, send an email to [elasticsearch+unsubscribe@googlegroups.com](mailto:elasticsearch+unsubscribe@googlegroups.com).  
For more options, visit [https://groups.google.com/groups/opt\_out](https://groups.google.com/groups/opt_out).

---

<div class="post-metadata">

**Author:** ![troy](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/troy/32/2547_2.png) [@troy](https://discuss.elastic.co/u/troy)\
**Post date:** [February 25, 2013, 11:27pm UTC](https://discuss.elastic.co/t/removing-data-fields-before-indexing-with-the-couchdb-river/10894/3 "2013-02-25T23:27:53Z")

</div>

Thank you Drew. That looks like exactly what I need...🕶

On Monday, February 25, 2013 3:13:59 PM UTC-8, Drew Raines wrote:

> [tr...@scriptedmotion.com](mailto:tr...@scriptedmotion.com) \<javascript:\> wrote:
> 
> > I'm storing user data in an application I'm writing in couchdb. I'd  
> > like to make the user data searchable using ES, but I don't want to  
> > include certain fields in the data that gets indexed in ES  
> > (password, reset password token, etc). I'm contemplating using the  
> > river plugin, but not sure if it's possible to exclude fields from  
> > documents before they are indexed? The filter section seems to just  
> > filter whole documents from being indexed if I understand it  
> > correctly.
> 
> Have a look at the script filter option in the docs. You can fix up  
> the doc however you want before it's passed on.
> 
> [https://github.com/elasticsearch/elasticsearch-river-couchdb/blob/master/README.md](https://github.com/elasticsearch/elasticsearch-river-couchdb/blob/master/README.md)
> 
> -Drew

--  
You received this message because you are subscribed to the Google Groups "elasticsearch" group.  
To unsubscribe from this group and stop receiving emails from it, send an email to [elasticsearch+unsubscribe@googlegroups.com](mailto:elasticsearch+unsubscribe@googlegroups.com).  
For more options, visit [https://groups.google.com/groups/opt\_out](https://groups.google.com/groups/opt_out).

---

<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, 2:49am UTC](https://discuss.elastic.co/t/removing-data-fields-before-indexing-with-the-couchdb-river/10894/4 "2017-07-06T02:49:35Z")

</div>


