Adding new fields to an existing Index


(Rahul Sharma) #1

Hi,

Is it possible to specify the type and analyzer while adding a new field to
an existing index?
Looks like ES identifies automatically the type and uses the default
analyzer.

Would appropriate your help.

Thanks
Rahul


(Igor Motov) #2

You can use Put Mapping API to add new fields with proper mapping before
the first instance of such field is indexed. See
http://www.elasticsearch.org/guide/reference/api/admin-indices-put-mapping.html
for more information.

On Thursday, April 19, 2012 8:06:08 AM UTC-4, Rahul Sharma wrote:

Hi,

Is it possible to specify the type and analyzer while adding a new field
to an existing index?
Looks like ES identifies automatically the type and uses the default
analyzer.

Would appropriate your help.

Thanks
Rahul


(Rahul Sharma) #3

Thanks!! This helps :slight_smile:

On Thu, Apr 19, 2012 at 10:30 PM, Igor Motov imotov@gmail.com wrote:

You can use Put Mapping API to add new fields with proper mapping before
the first instance of such field is indexed. See
http://www.elasticsearch.org/guide/reference/api/admin-indices-put-mapping.htmlfor more information.

On Thursday, April 19, 2012 8:06:08 AM UTC-4, Rahul Sharma wrote:

Hi,

Is it possible to specify the type and analyzer while adding a new field
to an existing index?
Looks like ES identifies automatically the type and uses the default
analyzer.

Would appropriate your help.

Thanks
Rahul


(system) #4