Mohammad Norouzi wrote:
Hi
you know, actually we dont indexed this field as Date. we always use string instead of Date type because we use both Hijri date and Gregorian date so if
we put a Hijri date the DateField not work properly. that is why we index
such this field as String.

What DateField does is to convert the date to milliseconds and then to a base 36 number, and then it pads the string out so that all date strings are the same length. So no matter what Calendar you happen to have used to build up your Date, it would work correctly and sort in the correct fashion.

Strings on the other hand would never work since when you search a date range in one calendar it wouldn't correctly return results in the other calendar, which would generally be undesirable behaviour (but maybe in your application you need it to omit results when they're in the wrong calendar.)

Daniel


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to