Fielddata doesn't agree with _source for a "long" field

Hey guys! I'm a newcomer and have been diving deep into ElasticSearch for
the last week.

Today, I've been trying to debug a maddening issue: I have a "long" field
that contains decimals between 0 and 1, and sorting on it is not working.
The records that are exactly 0 or exactly 1 show up in the right place, but
any values in between are treated as if they were 0 for the purpose of
sorting. I found the fielddata_fields setting, and it turns out my hunch
was right: a given value would show up as 0.155676 in _source, but
wrongfully show as 0 in the "fields" hash that I get from fielddata_fields.

I can't figure out why, and google comes up with nothing. Help would be
appreciated!

--
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/8af2c674-c8ac-4942-bc64-7f1310fa7546%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

You should change the mapping for this field and use float or double: Elasticsearch Platform — Find real-time answers at scale | Elastic

David

Le 18 janv. 2015 à 10:25, Sergey Tsalkov stsalkov@gmail.com a écrit :

Hey guys! I'm a newcomer and have been diving deep into Elasticsearch for the last week.

Today, I've been trying to debug a maddening issue: I have a "long" field that contains decimals between 0 and 1, and sorting on it is not working. The records that are exactly 0 or exactly 1 show up in the right place, but any values in between are treated as if they were 0 for the purpose of sorting. I found the fielddata_fields setting, and it turns out my hunch was right: a given value would show up as 0.155676 in _source, but wrongfully show as 0 in the "fields" hash that I get from fielddata_fields.

I can't figure out why, and google comes up with nothing. Help would be appreciated!

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/8af2c674-c8ac-4942-bc64-7f1310fa7546%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/29EA5BA9-709D-41A0-857F-2C3CA375AF0C%40pilato.fr.
For more options, visit https://groups.google.com/d/optout.

Oh, long is actually an integer field, isn't it? I feel like such an idiot.
Much gratitude to you!

On Sunday, January 18, 2015 at 1:35:22 AM UTC-8, David Pilato wrote:

You should change the mapping for this field and use float or double:
Elasticsearch Platform — Find real-time answers at scale | Elastic

David

Le 18 janv. 2015 à 10:25, Sergey Tsalkov <stsa...@gmail.com <javascript:>>
a écrit :

Hey guys! I'm a newcomer and have been diving deep into Elasticsearch for
the last week.

Today, I've been trying to debug a maddening issue: I have a "long" field
that contains decimals between 0 and 1, and sorting on it is not working.
The records that are exactly 0 or exactly 1 show up in the right place, but
any values in between are treated as if they were 0 for the purpose of
sorting. I found the fielddata_fields setting, and it turns out my hunch
was right: a given value would show up as 0.155676 in _source, but
wrongfully show as 0 in the "fields" hash that I get from fielddata_fields.

I can't figure out why, and google comes up with nothing. Help would be
appreciated!

--
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 elasticsearc...@googlegroups.com <javascript:>.
To view this discussion on the web visit
https://groups.google.com/d/msgid/elasticsearch/8af2c674-c8ac-4942-bc64-7f1310fa7546%40googlegroups.com
https://groups.google.com/d/msgid/elasticsearch/8af2c674-c8ac-4942-bc64-7f1310fa7546%40googlegroups.com?utm_medium=email&utm_source=footer
.
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/94fadaee-047a-43f6-b1b9-e51f08a92ded%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.