Mapping problem, date and range filter

When I have a wrong mapping (type = string, not date) like this one

created_at: {
type: string
}

and the entries look like:

Sun Oct 05 23:15:22 +0000 2014

I guess I can't use the range query to get documents for a certain time
span?

It would work to search for a string, such as "Sun Oct 05" to get all
documents of that day but can you imagine of any way in this situation to
get the documents for example for

Tue Aug 26 to Sun Oct 05 ?

I'm afraid I have to reindex the index to the propper date mapping, hm, no
experiences on that, what would be the easiest way to do that for about 60
million documents?

Thanks for your help!

--
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.
To view this discussion on the web visit https://groups.google.com/d/msgid/elasticsearch/f53a7c30-92f3-4f97-9930-d88fc9945c7e%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Yeah. You should reindex.
You could use scan&scroll API to read your index and then write results in another one.

IIRC there are some scripts and plugins on internet.

--
David :wink:
Twitter : @dadoonet / @elasticsearchfr / @scrutmydocs

Le 26 déc. 2014 à 00:50, Finn Poitier finnpoitier@googlemail.com a écrit :

When I have a wrong mapping (type = string, not date) like this one

created_at: {
type: string
}

and the entries look like:

Sun Oct 05 23:15:22 +0000 2014

I guess I can't use the range query to get documents for a certain time span?

It would work to search for a string, such as "Sun Oct 05" to get all documents of that day but can you imagine of any way in this situation to get the documents for example for

Tue Aug 26 to Sun Oct 05 ?

I'm afraid I have to reindex the index to the propper date mapping, hm, no experiences on that, what would be the easiest way to do that for about 60 million documents?

Thanks for your help!

--
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.
To view this discussion on the web visit https://groups.google.com/d/msgid/elasticsearch/f53a7c30-92f3-4f97-9930-d88fc9945c7e%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

--
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.
To view this discussion on the web visit https://groups.google.com/d/msgid/elasticsearch/97D6D880-5D30-452D-ABAA-84B35918DEB9%40pilato.fr.
For more options, visit https://groups.google.com/d/optout.