Setting the mapping in advance for those fields, and indexing will retain the dynamic nature for the rest of the document. Can you maybe gist your put mapping code, and how you detect the other fields are not being indexed?
On Tuesday, December 14, 2010 at 12:40 AM, Pete Aykroyd wrote:
Hi,
I think I'm probably missing something obvious but I can't figure how to set a few mappings manually on my schema and retain the automatic mappings.
The exact problem is that I've been using elastic for the past week or so completely with the dynamic schema mappings and everything was fine. But I now want to sometimes return a field with my query... So there are a few fields in the schema that I want to set stored to true on. For the rest of the fields, I want them to continue to get their mappings dynamically, since there are a lot of them and more may be added in the future.
If try to put a mapping for just that the field with data already indexed, obviously there is a merge conflict because it has already had indexed those fields with stored = false.
If I set ignore_conflicts to true and then re-index my data, it doesn't seem to have any effect and checking the _mapping shows that stored still isn't set.
I've tried blowing away the index completely, then setting a mapping with the two fields I care about being stored in it, and then re-indexing, but then nothing else is mapped.What's the right way to do this?
Thanks,
Pete