# PIG: Reindexing documents with \_source disabled

**URL:** <https://discuss.elastic.co/t/pig-reindexing-documents-with--source-disabled/15509>\
**Category:** Elasticsearch\
**Created:** [January 30, 2014, 8:35pm UTC](https://discuss.elastic.co/t/pig-reindexing-documents-with--source-disabled/15509 "2014-01-30T20:35:57Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Tyler\_C](https://avatars.discourse-cdn.com/v4/letter/t/bc79bd/32.png) [@Tyler\_C](https://discuss.elastic.co/u/Tyler_C)\
**Post date:** [January 30, 2014, 8:35pm UTC](https://discuss.elastic.co/t/pig-reindexing-documents-with--source-disabled/15509/1 "2014-01-30T20:35:57Z")

</div>

My question is about using Pig to update ES. If my index has \_source  
disabled (I only wish to count the number of documents matching a query),  
how does one reindex a document?  
Here's how I plan on using pig and elastic search:

Use ES-pig to initially create an index of 10,000,000 documents. No \_source.  
1 Week later, index or reindex 10,000,000 documents, where maybe 95% of the  
docs are overlap with the original set.

Is this possible with \_source disabled? In normal operations update/upsert  
operations are not possible without \_source, presumably this extends to the  
elasticsearch-hadoop bridges.

T.

--  
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).  
To view this discussion on the web visit [https://groups.google.com/d/msgid/elasticsearch/89ed687e-fc5a-4dd5-b81d-310b3c1fe363%40googlegroups.com](https://groups.google.com/d/msgid/elasticsearch/89ed687e-fc5a-4dd5-b81d-310b3c1fe363%40googlegroups.com).  
For more options, visit [https://groups.google.com/groups/opt\_out](https://groups.google.com/groups/opt_out).

---

<div class="post-metadata">

**Author:** ![Binh\_Ly](https://avatars.discourse-cdn.com/v4/letter/b/ce7236/32.png) [@Binh\_Ly](https://discuss.elastic.co/u/Binh_Ly)\
**Post date:** [January 30, 2014, 10:08pm UTC](https://discuss.elastic.co/t/pig-reindexing-documents-with--source-disabled/15509/2 "2014-01-30T22:08:31Z")

</div>

Tyler, no experience with Pig here. However, from the ES perspective, you  
will need the full JSON document to be able to index anything into ES. This  
JSON document can come from anywhere external to ES, or from the \_source  
field (if enabled) of an already existing ES index. And even if \_source was  
available in an ES index, you'd still need to read it out and then  
push/index it back in (whether to the same or to a new index) if you want  
to do a "reindex".

--  
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).  
To view this discussion on the web visit [https://groups.google.com/d/msgid/elasticsearch/34306bfc-a451-4543-a45d-617857f3d903%40googlegroups.com](https://groups.google.com/d/msgid/elasticsearch/34306bfc-a451-4543-a45d-617857f3d903%40googlegroups.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, 1:53am UTC](https://discuss.elastic.co/t/pig-reindexing-documents-with--source-disabled/15509/3 "2017-07-06T01:53:49Z")

</div>


