# ElasticSearch indexing CouchDb views

**URL:** <https://discuss.elastic.co/t/elasticsearch-indexing-couchdb-views/6866>\
**Category:** Elasticsearch\
**Created:** [March 2, 2012, 1:20pm UTC](https://discuss.elastic.co/t/elasticsearch-indexing-couchdb-views/6866 "2012-03-02T13:20:05Z")\
**Posts on this page:** 9\
**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:** [March 2, 2012, 1:20pm UTC](https://discuss.elastic.co/t/elasticsearch-indexing-couchdb-views/6866/1 "2012-03-02T13:20:05Z")

</div>

Hi all,  
with the support of David Pilato I've downloaded a build of his extended  
couchdb river plugin. The extended plugin allows you to configure  
elasticsearch to index a view rather than \_all\_docs. Significantly this  
capability offers a potential indexing performance increase by only  
indexing selected parts of your document.

The plugin installed and ran without any problems under both 0.19 RC3 and  
today's 0.19 Release.

You can download the plugin from  
[https://github.com/downloads/dadoonet/elasticsearch-river-couchdb/elasticsea](https://github.com/downloads/dadoonet/elasticsearch-river-couchdb/elasticsea)[https://github.com/downloads/dadoonet/elasticsearch-river-couchdb/elasticsearch-river-couchdb-1.2.0-SNAPSHOT.zip](https://github.com/downloads/dadoonet/elasticsearch-river-couchdb/elasticsearch-river-couchdb-1.2.0-SNAPSHOT.zip)  
rch-river-couchdb-1.2.0-SNAPSHOT.zip[https://github.com/downloads/dadoonet/elasticsearch-river-couchdb/elasticsearch-river-couchdb-1.2.0-SNAPSHOT.zip](https://github.com/downloads/dadoonet/elasticsearch-river-couchdb/elasticsearch-river-couchdb-1.2.0-SNAPSHOT.zip)

Guidance in its use is at:  
[https://github.com/dadoonet/elasticsearch-river-couchdb/tree/dpi\_views](https://github.com/dadoonet/elasticsearch-river-couchdb/tree/dpi_views)

Hopefully this new code will make it into the trunk fairly soon.

Well done David,  
Ian

---

<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:** [March 2, 2012, 3:59pm UTC](https://discuss.elastic.co/t/elasticsearch-indexing-couchdb-views/6866/2 "2012-03-02T15:59:25Z")

</div>

Thanks for the feedback Ian. It's good to know that other people test it before Shay merge the pull request in head.

Shay, if you agree with this pull request [1], could you merge it ?  
Do you need more readme notes ?

David 😉  
@dadoonet

[1] [Add support for views by dadoonet · Pull Request #2 · elastic/elasticsearch-river-couchdb · GitHub](https://github.com/elasticsearch/elasticsearch-river-couchdb/pull/2)

Le 2 mars 2012 à 14:20, ian mayo [ian@planetmayo.com](mailto:ian@planetmayo.com) a écrit :

> Hi all,  
> with the support of David Pilato I've downloaded a build of his extended couchdb river plugin. The extended plugin allows you to configure elasticsearch to index a view rather than \_all\_docs. Significantly this capability offers a potential indexing performance increase by only indexing selected parts of your document.
> 
> The plugin installed and ran without any problems under both 0.19 RC3 and today's 0.19 Release.
> 
> You can download the plugin from [https://github.com/downloads/dadoonet/elasticsearch-river-couchdb/elasticsea](https://github.com/downloads/dadoonet/elasticsearch-river-couchdb/elasticsea)  
> rch-river-couchdb-1.2.0-SNAPSHOT.zip
> 
> Guidance in its use is at: [https://github.com/dadoonet/elasticsearch-river-couchdb/tree/dpi\_views](https://github.com/dadoonet/elasticsearch-river-couchdb/tree/dpi_views)
> 
> Hopefully this new code will make it into the trunk fairly soon.
> 
> Well done David,  
> Ian

---

<div class="post-metadata">

**Author:** ![Benoit\_Chesneau](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/benoit_chesneau/32/2822_2.png) [@Benoit\_Chesneau](https://discuss.elastic.co/u/Benoit_Chesneau)\
**Post date:** [March 2, 2012, 5:10pm UTC](https://discuss.elastic.co/t/elasticsearch-indexing-couchdb-views/6866/3 "2012-03-02T17:10:52Z")

</div>

On Fri, Mar 2, 2012 at 2:20 PM, ian mayo [ian@planetmayo.com](mailto:ian@planetmayo.com) wrote:

> Hi all,  
> with the support of David Pilato I've downloaded a build of his extended  
> couchdb river plugin. The extended plugin allows you to configure  
> elasticsearch to index a view rather than \_all\_docs. Significantly this  
> capability offers a potential indexing performance increase by only indexing  
> selected parts of your document.
> 
> The plugin installed and ran without any problems under both 0.19 RC3 and  
> today's 0.19 Release.
> 
> You can download the plugin  
> from [https://github.com/downloads/dadoonet/elasticsearch-river-couchdb/elasticsea](https://github.com/downloads/dadoonet/elasticsearch-river-couchdb/elasticsea)  
> rch-river-couchdb-1.2.0-SNAPSHOT.zip
> 
> Guidance in its use is  
> at: [https://github.com/dadoonet/elasticsearch-river-couchdb/tree/dpi\_views](https://github.com/dadoonet/elasticsearch-river-couchdb/tree/dpi_views)
> 
> Hopefully this new code will make it into the trunk fairly soon.
> 
> Well done David,  
> Ian

Does it means that it will ge all the results from the veiw each time  
? Or do you get changes only ?

---

<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:** [March 2, 2012, 5:15pm UTC](https://discuss.elastic.co/t/elasticsearch-indexing-couchdb-views/6866/4 "2012-03-02T17:15:43Z")

</div>

Only based on change API.

So when a doc change, we fetch the view using the doc id.

David 😉  
@dadoonet

Le 2 mars 2012 à 18:10, Benoit Chesneau [bchesneau@gmail.com](mailto:bchesneau@gmail.com) a écrit :

> On Fri, Mar 2, 2012 at 2:20 PM, ian mayo [ian@planetmayo.com](mailto:ian@planetmayo.com) wrote:
> 
> > Hi all,  
> > with the support of David Pilato I've downloaded a build of his extended  
> > couchdb river plugin. The extended plugin allows you to configure  
> > elasticsearch to index a view rather than \_all\_docs. Significantly this  
> > capability offers a potential indexing performance increase by only indexing  
> > selected parts of your document.
> > 
> > The plugin installed and ran without any problems under both 0.19 RC3 and  
> > today's 0.19 Release.
> > 
> > You can download the plugin  
> > from [https://github.com/downloads/dadoonet/elasticsearch-river-couchdb/elasticsea](https://github.com/downloads/dadoonet/elasticsearch-river-couchdb/elasticsea)  
> > rch-river-couchdb-1.2.0-SNAPSHOT.zip
> > 
> > Guidance in its use is  
> > at: [https://github.com/dadoonet/elasticsearch-river-couchdb/tree/dpi\_views](https://github.com/dadoonet/elasticsearch-river-couchdb/tree/dpi_views)
> > 
> > Hopefully this new code will make it into the trunk fairly soon.
> > 
> > Well done David,  
> > Ian
> 
> Does it means that it will ge all the results from the veiw each time  
> ? Or do you get changes only ?

---

<div class="post-metadata">

**Author:** ![Benoit\_Chesneau](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/benoit_chesneau/32/2822_2.png) [@Benoit\_Chesneau](https://discuss.elastic.co/u/Benoit_Chesneau)\
**Post date:** [March 2, 2012, 5:19pm UTC](https://discuss.elastic.co/t/elasticsearch-indexing-couchdb-views/6866/5 "2012-03-02T17:19:32Z")

</div>

On Fri, Mar 2, 2012 at 6:15 PM, David Pilato [david@pilato.fr](mailto:david@pilato.fr) wrote:

> Only based on change API.
> 
> So when a doc change, we fetch the view using the doc id.

hum ok. So maybe that :

[http://lists.refuge.io/refuge/0122.html](http://lists.refuge.io/refuge/0122.html)

will help ?

- benoit

---

<div class="post-metadata">

**Author:** ![kimchy](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/kimchy/32/44952_2.png) [@kimchy](https://discuss.elastic.co/u/kimchy)\
**Post date:** [March 3, 2012, 10:08pm UTC](https://discuss.elastic.co/t/elasticsearch-indexing-couchdb-views/6866/6 "2012-03-03T22:08:58Z")

</div>

The main reason I haven't pulled this one in is because I am not too familiar with views and the right way to do it with couch, so the more input we can get from the community, the better 🙂

On Friday, March 2, 2012 at 7:19 PM, Benoit Chesneau wrote:

> On Fri, Mar 2, 2012 at 6:15 PM, David Pilato \<[david@pilato.fr](mailto:david@pilato.fr) ([mailto:david@pilato.fr](mailto:david@pilato.fr))\> wrote:
> 
> > Only based on change API.
> > 
> > So when a doc change, we fetch the view using the doc id.
> 
> hum ok. So maybe that :
> 
> [http://lists.refuge.io/refuge/0122.html](http://lists.refuge.io/refuge/0122.html)
> 
> will help ?
> 
> - benoit

---

<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:** [March 3, 2012, 11:22pm UTC](https://discuss.elastic.co/t/elasticsearch-indexing-couchdb-views/6866/7 "2012-03-03T23:22:14Z")

</div>

Sure.

Note that if users don't use this new feature (let's say experimental), there is no cost.

So, I think it's safe to pull it in.

BTW, I will look at what Benoist suggest to see if the code could be more efficient. But, it can be a new issue (change request) for the couchDb plugin.

David 😉  
@dadoonet

Le 3 mars 2012 à 23:08, Shay Banon [kimchy@gmail.com](mailto:kimchy@gmail.com) a écrit :

> The main reason I haven't pulled this one in is because I am not too familiar with views and the right way to do it with couch, so the more input we can get from the community, the better 🙂  
> On Friday, March 2, 2012 at 7:19 PM, Benoit Chesneau wrote:
> 
> > On Fri, Mar 2, 2012 at 6:15 PM, David Pilato [david@pilato.fr](mailto:david@pilato.fr) wrote:
> > 
> > > Only based on change API.
> > > 
> > > So when a doc change, we fetch the view using the doc id.
> > 
> > hum ok. So maybe that :
> > 
> > [http://lists.refuge.io/refuge/0122.html](http://lists.refuge.io/refuge/0122.html)
> > 
> > will help ?
> > 
> > - benoit

---

<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 25, 2012, 8:03am UTC](https://discuss.elastic.co/t/elasticsearch-indexing-couchdb-views/6866/8 "2012-04-25T08:03:59Z")

</div>

Hi there David,  
has the views code been integrated into the trunk yet?

I saw in your comment [1] that you'd merged with 0.19, but the CouchDb  
river readme still doesn't include reference to support for views.

cheers,  
Ian

[1]. [https://github.com/elasticsearch/elasticsearch-river-couchdb/pull/2#commits-pushed-a35917b](https://github.com/elasticsearch/elasticsearch-river-couchdb/pull/2#commits-pushed-a35917b)

---

<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:31am UTC](https://discuss.elastic.co/t/elasticsearch-indexing-couchdb-views/6866/9 "2017-07-06T03:31:12Z")

</div>


