I’ve been looking at Subtext’s Lucene.Net implementation as a guide to do something similar with our websites. When Subtext index or search for a given post, it runs the ID through NumericUtils.IntToPrefixCoded.
According to the Lucene docs, it does some shifting, but doesn’t lose precision.
So, what’s the point? What does it do, and why?
I’ve been looking at Subtext’s Lucene.Net implementation as a guide to do something similar
Share
You need to look at the class documentation, which explains it in more detail:
As I understand,
intToPrefixCodedmethod does exactly that: takesintvalue, shifts it and returns a sortableStringas explained above.