# Work Around to index Array of Integer in normal index field

**URL:** <https://discuss.elastic.co/t/work-around-to-index-array-of-integer-in-normal-index-field/8264>\
**Category:** Elasticsearch\
**Created:** [June 29, 2012, 4:12pm UTC](https://discuss.elastic.co/t/work-around-to-index-array-of-integer-in-normal-index-field/8264 "2012-06-29T16:12:19Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![manoj\_2](https://avatars.discourse-cdn.com/v4/letter/m/e0b2c6/32.png) [@manoj\_2](https://discuss.elastic.co/u/manoj_2)\
**Post date:** [June 29, 2012, 4:12pm UTC](https://discuss.elastic.co/t/work-around-to-index-array-of-integer-in-normal-index-field/8264/1 "2012-06-29T16:12:19Z")

</div>

Hi All,

I am interested to know, if there is a any work around to index an array of  
integer values to a normal integer field, with out modifying the mapping  
JSON. Because, I don't want to re-index my huge DB for this field.

Thanks in advance!  
Manoj

---

<div class="post-metadata">

**Author:** ![kimchy](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/kimchy/32/44952_2.png) [@kimchy](https://discuss.elastic.co/u/kimchy)\
**Post date:** [June 29, 2012, 6:29pm UTC](https://discuss.elastic.co/t/work-around-to-index-array-of-integer-in-normal-index-field/8264/2 "2012-06-29T18:29:46Z")

</div>

What do you mean? You have a field that had single value integer field, and  
you want now to index the same field with multiple values? It is supported.

On Fri, Jun 29, 2012 at 6:12 PM, Manoj [manokrrish@gmail.com](mailto:manokrrish@gmail.com) wrote:

> Hi All,
> 
> I am interested to know, if there is a any work around to index an array  
> of integer values to a normal integer field, with out modifying the mapping  
> JSON. Because, I don't want to re-index my huge DB for this field.
> 
> Thanks in advance!  
> Manoj

---

<div class="post-metadata">

**Author:** ![manoj\_2](https://avatars.discourse-cdn.com/v4/letter/m/e0b2c6/32.png) [@manoj\_2](https://discuss.elastic.co/u/manoj_2)\
**Post date:** [July 1, 2012, 12:22pm UTC](https://discuss.elastic.co/t/work-around-to-index-array-of-integer-in-normal-index-field/8264/3 "2012-07-01T12:22:49Z")

</div>

Thanks Kimchy, This gave me a peace of mind

I am using the following type of Mapping Syntax for arrays.

"idarray":  
{  
"properties":{  
"id":{"type" : "integer", "store" : "yes","precision\_step"  
: "0"}  
}  
}

but for single Integer, it is something like below.

"id" : { "type" : "integer", "store" : "yes", "precision\_step" : "0" }

Won't it affect the older index(existing index), if I try to Index an array  
of integers using the JSON format mentioned with field "idarray"?

Or is there something I understood wrong here?

I just wanted to confirm before making changes to my production.

On Friday, June 29, 2012 11:59:46 PM UTC+5:30, kimchy wrote:

> What do you mean? You have a field that had single value integer field,  
> and you want now to index the same field with multiple values? It is  
> supported.
> 
> On Fri, Jun 29, 2012 at 6:12 PM, Manoj [manokrrish@gmail.com](mailto:manokrrish@gmail.com) wrote:
> 
> > Hi All,
> > 
> > I am interested to know, if there is a any work around to index an array  
> > of integer values to a normal integer field, with out modifying the mapping  
> > JSON. Because, I don't want to re-index my huge DB for this field.
> > 
> > Thanks in advance!  
> > Manoj

---

<div class="post-metadata">

**Author:** ![manoj\_2](https://avatars.discourse-cdn.com/v4/letter/m/e0b2c6/32.png) [@manoj\_2](https://discuss.elastic.co/u/manoj_2)\
**Post date:** [July 3, 2012, 4:28am UTC](https://discuss.elastic.co/t/work-around-to-index-array-of-integer-in-normal-index-field/8264/4 "2012-07-03T04:28:26Z")

</div>

Any updates on this?

On Friday, June 29, 2012 11:59:46 PM UTC+5:30, kimchy wrote:

> What do you mean? You have a field that had single value integer field,  
> and you want now to index the same field with multiple values? It is  
> supported.
> 
> On Fri, Jun 29, 2012 at 6:12 PM, Manoj [manokrrish@gmail.com](mailto:manokrrish@gmail.com) wrote:
> 
> > Hi All,
> > 
> > I am interested to know, if there is a any work around to index an array  
> > of integer values to a normal integer field, with out modifying the mapping  
> > JSON. Because, I don't want to re-index my huge DB for this field.
> > 
> > Thanks in advance!  
> > Manoj

---

<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, 3:21am UTC](https://discuss.elastic.co/t/work-around-to-index-array-of-integer-in-normal-index-field/8264/5 "2017-07-06T03:21:42Z")

</div>


