Elasticsearch dedicated percolator doc values in percolator script

Trying to migrate Elasticsearch from 1.x to 2.x, almost everything is done but I came up to this issue.

As mentioned in the Elasticsearch docs - https://www.elastic.co/guide/en/elasticsearch/reference/current/search-percolate.html at the moment it is not possible to percolate geo_points in the same index where documents are.

So I have created new index with the same mappings as document index. Percolating on the geo_points works fine. But I am having problems with some inline groovy scripts.

Caused by: ScriptException[failed to run inline script [1000 <= (doc['price'].value / doc['areaM2'].value) && (doc['
price'].value / doc['areaM2'].value) <= 10000] using lang [groovy]]; nested: IllegalStateException[unexpected docval
ues type NONE for field 'price' (expected one of [SORTED_NUMERIC, NUMERIC]). Use UninvertingReader or index with doc
price type is specified as long in the mappings, so it should have a doc value.

I have googled everything and have no idea how to fix it.

Only thing which comes in my mind - maybe document which is recently added has not built doc values at that point yet?

One more thing to mention - when I execute the same query in the search request - it works normally.

Maybe this is not related, but can you tell me how did you migrate .percolator documents from ES 1.x to 2.x.
As 1.x has an default _id field in the mapping which doesn't allow to migrate to ES 2.x.
Thanks in advance.

Well, since I needed to do some other stuff with these docs - I had a script which loaded them from one index to another.

Thanks @sandris for the reply. I don't want to highjack your thread, if you can provide any help for this problem: Snapshot & Restore failing while restoring indices from ES 1.6.1 to ES 2.1.2

It would be really helpful.

Hmm, dont remember if I had the same problem.

But it looks like you need to manually move the data while removing that field. Should not be so hard.