One possible solution is to add those fields twice
once in a stored/unindexed field in the correct format
for output and another in an unstored/indexed field
with the correct format for sorting and range queries.
Yes, I’ll likely do this, in combination with some form of hungarian
notation to indicate the “native” type of the field.
This would allow all dates to be stored as is by Ferret, but allow the
presentation layer to reformat the date for display to dd/mm/yyyy
For numbers I am planning to pad the string with zeros which will
likewise support ranges/sorting, and then strip the zeros in the
Actually, sorting will already work on those fields above
I don’t see how sorting could work for dates stored as “dd/mm/yyyy” …
Would you elaborate?
Finally, I’ve mentioned before that I’m very interested in
building an object database based on Ferret. I mentioned it here:
By turning documents into objects and giving fields types it
would solve the problems you have just mentioned plus many more.
Yes, I think this is a very interesting idea, very useful and
reminiscent of WinFS for objects!