Create CouchDB Index with Java API


(Luke) #1

I was hoping that you could help me out, I'm trying to cause elastic
to create a couchdb river index, using the java api. Unfortunately I
can't find any information on how to do it in java, and I'd rather not
run straight http puts if there is a way to use the API.

Thanks in advance,
Luke


(Shay Banon) #2

Rivers are just stored in a special _river index, and creating them is a simple index request of a document that represents the configuration of the river. In this sample: http://www.elasticsearch.org/guide/reference/river/couchdb.html, you just index a doc into the _river index, my_db type, with id of _meta, and the json there (using XContent to build it, Map of Maps, or just a string).
On Wednesday, March 23, 2011 at 12:28 AM, Luke wrote:

I was hoping that you could help me out, I'm trying to cause elastic
to create a couchdb river index, using the java api. Unfortunately I
can't find any information on how to do it in java, and I'd rather not
run straight http puts if there is a way to use the API.

Thanks in advance,
Luke


(Luke) #3

That makes perfect sense,
Thanks

On Tue, Mar 22, 2011 at 18:36, Shay Banon shay.banon@elasticsearch.comwrote:

Rivers are just stored in a special _river index, and creating them is a
simple index request of a document that represents the configuration of the
river. In this sample:
http://www.elasticsearch.org/guide/reference/river/couchdb.html, you just
index a doc into the _river index, my_db type, with id of _meta, and the
json there (using XContent to build it, Map of Maps, or just a string).

On Wednesday, March 23, 2011 at 12:28 AM, Luke wrote:

I was hoping that you could help me out, I'm trying to cause elastic
to create a couchdb river index, using the java api. Unfortunately I
can't find any information on how to do it in java, and I'd rather not
run straight http puts if there is a way to use the API.

Thanks in advance,
Luke


(system) #4