# ES-Hadoop jar marking field as not\_analyzed

**URL:** <https://discuss.elastic.co/t/es-hadoop-jar-marking-field-as-not-analyzed/68379>\
**Category:** Elasticsearch\
**Created:** [December 7, 2016, 11:01pm UTC](https://discuss.elastic.co/t/es-hadoop-jar-marking-field-as-not-analyzed/68379 "2016-12-07T23:01:41Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![bal](https://avatars.discourse-cdn.com/v4/letter/b/91b2a8/32.png) [@bal](https://discuss.elastic.co/u/bal)\
**Post date:** [December 7, 2016, 11:01pm UTC](https://discuss.elastic.co/t/es-hadoop-jar-marking-field-as-not-analyzed/68379/1 "2016-12-07T23:01:41Z")

</div>

Hi,

How do we mark a field as not\_analyzed in pig script itself. For e.g sample "name" field like name marked as not\_analyzed in below example:

{  
"name": {  
"type": "string",  
"index": "not\_analyzed"  
}  
}

How can we mark "name" field as not\_analyzed while populating through pig script. Sample pig script:

REGISTER /path/elasticsearch-hadoop.jar;

A = LOAD 'src/test/resources/artists.dat' USING PigStorage()  
AS (id:long, name, url:chararray, picture: chararray);  
-- transform data  
B = FOREACH A GENERATE name,url, picture;  
-- save the result to Elasticsearch  
STORE B INTO 'radio/artists' USING org.elasticsearch.hadoop.pig.EsStorage();

-- TODO name to be marked as not\_analyzed

Thanks!

---

<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:** [January 4, 2017, 11:02pm UTC](https://discuss.elastic.co/t/es-hadoop-jar-marking-field-as-not-analyzed/68379/2 "2017-01-04T23:02:10Z")

</div>

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