# Pre-processing Couchbase documents

**URL:** <https://discuss.elastic.co/t/pre-processing-couchbase-documents/107639>\
**Category:** Elasticsearch\
**Created:** [November 14, 2017, 9:36pm UTC](https://discuss.elastic.co/t/pre-processing-couchbase-documents/107639 "2017-11-14T21:36:53Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![jscubida](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/jscubida/32/24214_2.png) [@jscubida](https://discuss.elastic.co/u/jscubida)\
**Post date:** [November 14, 2017, 9:36pm UTC](https://discuss.elastic.co/t/pre-processing-couchbase-documents/107639/1 "2017-11-14T21:36:53Z")

</div>

Hello. What is the best way to transform a document coming from the Couchbase plugin? If using ingest node is the answer, how would one achieve this?

Specifically, we would like to transform a timestamp from a double (1487159155.4979) to a long (1487159155) before indexing occurs for the purpose of conforming to Elasticsearch's [date datatype](https://www.elastic.co/guide/en/elasticsearch/reference/5.6/date.html). The [documentation for ingest node](https://www.elastic.co/guide/en/elasticsearch/reference/5.6/ingest.html) describes exactly what we're looking for, but we haven't been able to figure out how to use it in conjunction with the [Couchbase Transport Plugin for Elasticsearch](https://github.com/couchbaselabs/elasticsearch-transport-couchbase). We were thinking about using the [script processor](https://www.elastic.co/guide/en/elasticsearch/reference/5.6/script-processor.html) but are also considering the [date processor](https://www.elastic.co/guide/en/elasticsearch/reference/5.6/date-processor.html).

Thanks ahead of time!

---

<div class="post-metadata">

**Author:** ![dnault](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/dnault/32/24449_2.png) [@dnault](https://discuss.elastic.co/u/dnault)\
**Post date:** [November 28, 2017, 9:28pm UTC](https://discuss.elastic.co/t/pre-processing-couchbase-documents/107639/2 "2017-11-28T21:28:59Z")

</div>

Hi J C,

[Version 3.0.0 of the Couchbase plugin](https://github.com/couchbaselabs/elasticsearch-transport-couchbase/releases/tag/3.0.0-cypress) lets you specify a `couchbase.pipeline` config property. Documents will be sent to the named pipeline for ingestion. Give it a shot and let us know how it works for you.

Thanks,  
David

---

<div class="post-metadata">

**Author:** ![jscubida](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/jscubida/32/24214_2.png) [@jscubida](https://discuss.elastic.co/u/jscubida)\
**Post date:** [December 1, 2017, 7:00pm UTC](https://discuss.elastic.co/t/pre-processing-couchbase-documents/107639/3 "2017-12-01T19:00:48Z")

</div>

Hi David,

Thanks so much for this! I just tried it out. It's exactly what we're looking for and works exactly as expected.

Thanks!  
J.C.

---

<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:** [December 29, 2017, 7:00pm UTC](https://discuss.elastic.co/t/pre-processing-couchbase-documents/107639/4 "2017-12-29T19:00:48Z")

</div>

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.
