How do we index floats?

Hello there,

I’m not sure where to post this question and hence the “Miscellaneous” section.

Which index should we use for xs:float in order to enable efficient querying. I want to search for floats within a window.

For example, I record weight of each student in a class resolved upto 3 decimals and then I want to search all those students who weigh between “x-0.0001” and “x+0.0001”, where x is some float.

My original database is not about students. It’s going to be a very big database with perhaps 1 million documents or so, in which each document would be 10-15KB on the avg. I thought of this student example because it’s easy to understand.

Eagerly waiting for the reply. Thanks in anticipation.

Best regards,

Hi Gopal,

a standard index should do