Hacker News new | past | comments | ask | show | jobs | submit login
Store and query numeric intervals in Lucene (Greplin open source) (github.com/greplin)
41 points by rwalker on Dec 6, 2010 | hide | past | favorite | 4 comments



Please excuse my ignorance, but can someone tell me why this is being voted up so quickly?

Lucene already has range queries, is this just enumerating all of the values within a range for the fields? It looks like they don't index these values either in the examples.

Edit: Not that this should take away from adding to Lucene, for that I thank you :)


As for what it does, it allows you to store an interval in Lucene, so you could store 1792 - 1796 or you could store 140000 - 125235466734. It uses a similar algorithm as the one used to store numbers so that it doesn't have to store millions of terms in the second example.

(we're pretty surprised by the response too!)


Thanks, it's really cool, I just wanted to make sure I wasn't missing something!


One application that this might be useful for is an IP lookup. Typically they're stored in block ranges and querying can be tricky, especially if its an offline operation done with hadoop. Could also be counter-productive, but an interesting thought.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: