# Support for CouchDb views

**URL:** <https://discuss.elastic.co/t/support-for-couchdb-views/11461>\
**Category:** Elasticsearch\
**Created:** [April 5, 2013, 10:21am UTC](https://discuss.elastic.co/t/support-for-couchdb-views/11461 "2013-04-05T10:21:51Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![ian\_mayo](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/ian_mayo/32/2324_2.png) [@ian\_mayo](https://discuss.elastic.co/u/ian_mayo)\
**Post date:** [April 5, 2013, 10:21am UTC](https://discuss.elastic.co/t/support-for-couchdb-views/11461/1 "2013-04-05T10:21:51Z")

</div>

For the last year I've been using David Pilato's modified CouchDb River  
that supports Views. [1]

Reading a view rather than the whole document greatly reduces the volume of  
data that ES has to store/index.

But, it appears that the functionality still hasn't made it into the master  
CouchDb River.

But, I see that the CouchDb River now has a filtering capability [2]. If  
the purpose of my CouchDb View was to ensure that only one element of my  
document got indexed, does Filtering offer an equivalent capability?

Cheers,  
Ian

[1]. [https://github.com/dadoonet/elasticsearch-river-couchdb](https://github.com/dadoonet/elasticsearch-river-couchdb)  
[2]. [https://github.com/elasticsearch/elasticsearch-river-couchdb#filtering](https://github.com/elasticsearch/elasticsearch-river-couchdb#filtering)

--  
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:** ![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:** [April 6, 2013, 7:26am UTC](https://discuss.elastic.co/t/support-for-couchdb-views/11461/2 "2013-04-06T07:26:29Z")

</div>

Hey Ian,

You should look at CouchDb filters doc: [http://guide.couchdb.org/draft/notifications.html#filters](http://guide.couchdb.org/draft/notifications.html#filters)  
A filter is IMHO a simple way to say if a document should be indexed or not.  
A view is a way to rearrange a document in many other subset.

If you store books in couchDb and each book has an array of chapters.  
If you want to index chapters in Elasticsearch (not books), you will probably use a view to split a book in chapters.

That's the main difference I see between filters and views.  
Filter -\> Yes or No  
Views -\> from one single doc to many other docs or the opposite or rewrite content of a doc

So you are using my modified river in production? For a year?  
That sounds it safe to merge it in official repo now. 😉

BTW, I merged some changes in my repo about views from Olivier Bornet: [https://github.com/dadoonet/elasticsearch-river-couchdb/commit/f8546ab19685a657dc7fdb3b5b2a679f2ca4dcef](https://github.com/dadoonet/elasticsearch-river-couchdb/commit/f8546ab19685a657dc7fdb3b5b2a679f2ca4dcef)

I will look at it and some other things I have in my backlog:

> **[dadoonet/elasticsearch-river-couchdb](https://github.com/dadoonet/elasticsearch-river-couchdb/tree/issue/25)**
>
> elasticsearch-river-couchdb - CouchDB River Plugin for ElasticSearch

  

> **[dadoonet/elasticsearch-river-couchdb](https://github.com/dadoonet/elasticsearch-river-couchdb/tree/issue/use_rev)**
>
> elasticsearch-river-couchdb - CouchDB River Plugin for ElasticSearch

## Cheers

David 😉  
Twitter : @dadoonet / @elasticsearchfr / @scrutmydocs

Le 5 avr. 2013 à 12:21, ian mayo [ian@planetmayo.com](mailto:ian@planetmayo.com) a écrit :

For the last year I've been using David Pilato's modified CouchDb River that supports Views. [1]

Reading a view rather than the whole document greatly reduces the volume of data that ES has to store/index.

But, it appears that the functionality still hasn't made it into the master CouchDb River.

But, I see that the CouchDb River now has a filtering capability [2]. If the purpose of my CouchDb View was to ensure that only one element of my document got indexed, does Filtering offer an equivalent capability?

Cheers,  
Ian

## [1]. [https://github.com/dadoonet/elasticsearch-river-couchdb](https://github.com/dadoonet/elasticsearch-river-couchdb) [2]. [https://github.com/elasticsearch/elasticsearch-river-couchdb#filtering](https://github.com/elasticsearch/elasticsearch-river-couchdb#filtering)

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).

--  
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:** ![ian\_mayo](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/ian_mayo/32/2324_2.png) [@ian\_mayo](https://discuss.elastic.co/u/ian_mayo)\
**Post date:** [April 8, 2013, 8:10am UTC](https://discuss.elastic.co/t/support-for-couchdb-views/11461/3 "2013-04-08T08:10:56Z")

</div>

On Saturday, 6 April 2013 08:26:29 UTC+1, David Pilato wrote:  
[...]

> If you store books in couchDb and each book has an array of chapters.  
> If you want to index chapters in Elasticsearch (not books), you will  
> probably use a view to split a book in chapters.
> 
> That's the main difference I see between filters and views.  
> Filter -\> Yes or No  
> Views -\> from one single doc to many other docs or the opposite or rewrite  
> content of a doc

I guess that in this metaphor, I just wish to index the Title Page (author,  
date, title, etc), and ignore the rest of the document.

So, I'm pretty sure I need a view.

> So you are using my modified river in production? For a year?  
> That sounds it safe to merge it in official repo now. 😉

I'd love to say that, but I can't. It's a development instance (hosted at  
Found.no). I suspect it's just indexed a few thousand documents via your  
View river.

But, I'd like to do all I can to get make it 'official'. The Found.No  
charging structure will change soon, and I'll reluctantly have to move on.  
Whilst Found.No were happy to accomodate this modified plugin, it looks  
like other providers aren't going to be as flexible. So, getting it into  
the core distribution seems my best chance.

Anybody have any suggestions for getting this fork into the 'trunk'?

[...]

> David 😉

Thanks again David,

Ian

--  
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:42am UTC](https://discuss.elastic.co/t/support-for-couchdb-views/11461/4 "2017-07-06T02:42:17Z")

</div>


