Populating IndexRequestBuilder from a Lucene Document instance?

Are there any simple ways of populating av ES IndexRequestBuilder from
a populated Lucene Document instance, i.e. reading out all fields
added to the Document instance and adding them to the
IndexRequestBuilder (or a ES Request instance)

The concrete use case is:
I have a JMS queue containing Lucene Document instance - and want to
consume that queue and add the received Documents to ES - imlemented
using a Es River, much like the way the elasticsearch-river-rabbitmq
plugin does it, except that queue contains Lucene Document instances,
not json-formated index requests.

The queue is fed by the Hibernate Search slave backend.

Any ideas?

Just go over the fields and build a json request with them. Should be
simple now? No need to have a river for that.

On Fri, Jan 6, 2012 at 12:24 PM, Kai Lilleby kai@systemfabrikken.no wrote:

Are there any simple ways of populating av ES IndexRequestBuilder from
a populated Lucene Document instance, i.e. reading out all fields
added to the Document instance and adding them to the
IndexRequestBuilder (or a ES Request instance)

The concrete use case is:
I have a JMS queue containing Lucene Document instance - and want to
consume that queue and add the received Documents to ES - imlemented
using a Es River, much like the way the elasticsearch-river-rabbitmq
plugin does it, except that queue contains Lucene Document instances,
not json-formated index requests.

The queue is fed by the Hibernate Search slave backend.

Any ideas?