Weight in Completion Suggester Is Being Rounded Down

I'm using the completion suggester with weights. It appears that the
weights for each suggestion is being rounded down. For example, if I have
suggestions "a" with weight 3.54 and "b" with weight 3.25, the weights for
both are rounded down to 3.0 when used for sorting and when they're
returned in the response.

Is this supposed to be the case and is there a way to use the weights with
double or float precision?

--
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.

Hey,

the weight is supposed to be an integer. See

I think it makes sense to actually throw an error if a non integer is being
indexed as weight in order to prevent confusion. Simplest solution for that
might be to multiply by 100 (or whatever factor needed) in your case on the
client side.

--Alex

On Tue, Oct 22, 2013 at 1:14 AM, Johny Lam johny.lam@gmail.com wrote:

I'm using the completion suggester with weights. It appears that the
weights for each suggestion is being rounded down. For example, if I have
suggestions "a" with weight 3.54 and "b" with weight 3.25, the weights for
both are rounded down to 3.0 when used for sorting and when they're
returned in the response.

Is this supposed to be the case and is there a way to use the weights with
double or float precision?

--
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.

--
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.