Erik I would complement the date with default values as you suggest and store a boolean flag indicating whether the date was complete or not, or store the original date if it is not complete which would probably be better because the presence of that data would tell you that the original date was not complete and you would also have it too.
Cheers François On Oct 29, 2011, at 9:12 AM, Erik Fäßler wrote: > Hi all, > > I want to index MEDLINE documents which not always contain complete dates of > publication. The year is known always. Now the Solr documentation states, > dates must have the format "1995-12-31T23:59:59Z" for which month, day and > even the time of the day must be known. > I could, of course, just complement uncomplete dates with default values, > 01-01 for example. But then I won't be able to distinguish between complete > and uncomplete dates afterwards which is of importance when displaying the > documents. > > I could just store the known information, e.g. the year, into an > integer-typed field, but then I won't have date math. > > Is there a good solution to my problem? Probably I'm just missing the > obvious, perhaps you can help me :-) > > Best regards, > > Erik