lucene-solr-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Lance Norskog <>
Subject Re: benefits of float vs. string
Date Thu, 29 Apr 2010 19:47:03 GMT
Floats are Trie types and are stored in a compressed format. They will
search faster. They will also sort with much less space.

One thing to point out is that doing bitwise comparison on floats is
to live in a state of sin. Your string representations must parse
exactly right.

On Wed, Apr 28, 2010 at 8:22 AM, Nagelberg, Kallin
<> wrote:
> Hi,
> Does anyone have an idea about the performance benefits of searching across floats compared
to strings? I have one multi-valued field that contains about 3000 distinct IDs across 5 million
documents. I am going to be a lot of queries like q=id:102 OR id:303 OR id:305, etc. Right
now it is a String but I am going to switch to a float as intuitively it ought to be easier
to filter a number than a string. I'm just curious if this should in fact bring a benefit,
and more generally what the benefits/penalties to using numerical over string field types
> Thanks,
> Kallin Nagelberg

Lance Norskog

View raw message