Metadata cleanup


(the_nozzle) #1

Hey all - is there a way to rid the index metadata of old field entries
that essentially point to nothing ? Thanks .

--
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.
For more options, visit https://groups.google.com/groups/opt_out.


(Boaz Leskes) #2

Hi,

Do you mean mapping fields? If so, the answer is no - there is currently no
way to remove them. The only option open to you is to reindex the index
without those fields.

Boaz

On Monday, November 18, 2013 9:51:18 PM UTC+1, the_nozzle wrote:

Hey all - is there a way to rid the index metadata of old field entries
that essentially point to nothing ? Thanks .

--
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.
For more options, visit https://groups.google.com/groups/opt_out.


(the_nozzle) #3

actually - let me clarify - I do have a mapping defined with some static
fields which allows dynamic field additions - The issue is that I posted
some objects with a string field , however later I decided to for that
field to be an object . When I post I get the unknown property exception -
That old field is still in the mapping as a string .. I was wondering if
there is some way to clean this up , otherwise I would have to rename all
the members of that field .. Thanks for any help.

On Monday, November 18, 2013 2:29:27 PM UTC-8, Boaz Leskes wrote:

Hi,

Do you mean mapping fields? If so, the answer is no - there is currently
no way to remove them. The only option open to you is to reindex the index
without those fields.

Boaz

On Monday, November 18, 2013 9:51:18 PM UTC+1, the_nozzle wrote:

Hey all - is there a way to rid the index metadata of old field entries
that essentially point to nothing ? Thanks .

--
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.
For more options, visit https://groups.google.com/groups/opt_out.


(the_nozzle) #4

actually - let me clarify - I do have a mapping defined with some static
fields which allows dynamic field additions - The issue is that I posted
some objects with a string field , however later I decided to for that
field to be an object . When I post I get the unknown property exception -
That old field is still in the mapping as a string .. I was wondering if
there is some way to clean this up , otherwise I would have to rename that
field (and a few others with the same problem.. the json serializer
decided to output an escaped string instead of valid json).. Thanks for
any help.

On Monday, November 18, 2013 2:29:27 PM UTC-8, Boaz Leskes wrote:

Hi,

Do you mean mapping fields? If so, the answer is no - there is currently
no way to remove them. The only option open to you is to reindex the index
without those fields.

Boaz

On Monday, November 18, 2013 9:51:18 PM UTC+1, the_nozzle wrote:

Hey all - is there a way to rid the index metadata of old field entries
that essentially point to nothing ? Thanks .

--
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.
For more options, visit https://groups.google.com/groups/opt_out.


(Boaz Leskes) #5

Hi,

Once a field is created you can not change it's type. The reason behind it
that ES already has data for that field and needs to stay consisted with it.

The only option you have is deleting the index (or the type for that
matter) and create it again, or creating a new index and copying the data
over without the field in question.

On Tue, Nov 19, 2013 at 12:50 AM, the_nozzle k11stan@gmail.com wrote:

actually - let me clarify - I do have a mapping defined with some static
fields which allows dynamic field additions - The issue is that I posted
some objects with a string field , however later I decided to for that
field to be an object . When I post I get the unknown property exception -
That old field is still in the mapping as a string .. I was wondering if
there is some way to clean this up , otherwise I would have to rename that
field (and a few others with the same problem.. the json serializer
decided to output an escaped string instead of valid json).. Thanks for
any help.

On Monday, November 18, 2013 2:29:27 PM UTC-8, Boaz Leskes wrote:

Hi,

Do you mean mapping fields? If so, the answer is no - there is currently
no way to remove them. The only option open to you is to reindex the index
without those fields.

Boaz

On Monday, November 18, 2013 9:51:18 PM UTC+1, the_nozzle wrote:

Hey all - is there a way to rid the index metadata of old field entries
that essentially point to nothing ? Thanks .

--
You received this message because you are subscribed to a topic in the
Google Groups "elasticsearch" group.
To unsubscribe from this topic, visit
https://groups.google.com/d/topic/elasticsearch/h2AmetuUoGk/unsubscribe.
To unsubscribe from this group and all its topics, send an email to
elasticsearch+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

--
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.
For more options, visit https://groups.google.com/groups/opt_out.


(the_nozzle) #6

thanks for the reply . Yah I just used different names .. I thought that
once all data associated with the field is gone it would go away magically,
but the index and the actual data are 2 very different things ... Thanks
for your help.

On Tuesday, November 19, 2013 12:59:04 AM UTC-8, Boaz Leskes wrote:

Hi,

Once a field is created you can not change it's type. The reason behind it
that ES already has data for that field and needs to stay consisted with it.

The only option you have is deleting the index (or the type for that
matter) and create it again, or creating a new index and copying the data
over without the field in question.

On Tue, Nov 19, 2013 at 12:50 AM, the_nozzle <k11...@gmail.com<javascript:>

wrote:

actually - let me clarify - I do have a mapping defined with some static
fields which allows dynamic field additions - The issue is that I posted
some objects with a string field , however later I decided to for that
field to be an object . When I post I get the unknown property exception -
That old field is still in the mapping as a string .. I was wondering if
there is some way to clean this up , otherwise I would have to rename that
field (and a few others with the same problem.. the json serializer
decided to output an escaped string instead of valid json).. Thanks for
any help.

On Monday, November 18, 2013 2:29:27 PM UTC-8, Boaz Leskes wrote:

Hi,

Do you mean mapping fields? If so, the answer is no - there is currently
no way to remove them. The only option open to you is to reindex the index
without those fields.

Boaz

On Monday, November 18, 2013 9:51:18 PM UTC+1, the_nozzle wrote:

Hey all - is there a way to rid the index metadata of old field entries
that essentially point to nothing ? Thanks .

--
You received this message because you are subscribed to a topic in the
Google Groups "elasticsearch" group.
To unsubscribe from this topic, visit
https://groups.google.com/d/topic/elasticsearch/h2AmetuUoGk/unsubscribe.
To unsubscribe from this group and all its topics, send an email to
elasticsearc...@googlegroups.com <javascript:>.
For more options, visit https://groups.google.com/groups/opt_out.

--
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.
For more options, visit https://groups.google.com/groups/opt_out.


(system) #7