: I have some text in our database in the form 0088698183939. The leading : zeros are useless, but I want to able to search it with no leading zeros : or several leading zeros. So, I decided to index this as a long, : expecting it to just store it as a number. But, instead, I see this in : the index:
Note the comment s about LongField in the example schema... Plain numeric field types that store and index the text value verbatim (and hence don't support range queries, since the lexicographic ordering isn't equal to the numeric ordering) ...LongField, IntField, etc.. all just index/store the exact value you put in -- the only distinctions between them and StrField is that they are rendered back as a numeric type (by the response writers) and they use the numericly typed FieldCache for sorting. You should be using TrieLongField (or SortableLongField if you need sortMissing* type functionality) -Hoss