I am using Zend Lucene to build a search feature for my website. All well and good.
Understanding that Lucene does searches lexicographically (e.g.
1,
110,
1111444,
2,
3,
4,
499238492834798,
5,
etc)
I have padded my numbers to 3 digits (ranging from 010 to 990).
When I do a range search for values 110 to 160 (e.g. fieldname:[110 TO 160])it is returning results for 040! Logically this is wrong as all the numbers would start with a 1 (although it would still search for 11, 12, 13, 14, 15 and 16) so it should not match this result!
Why is this happening, and how do I stop it from doing so?
[edit] I misread the Zend Documentation. The Range Query that sorts results lexicographically. But my problem persists.