: But Solr is (intentionally) stupid about dates, and
: requires the (almost) full date format. There are

I'm not sure how i feel about "intentionally stupid" ... but the 
underlying sentiment is correct: Solr requires clients to be *VERY* 
explicit about dates, because that way the client is in control of all the 
hard decisions like:

 * how should partial dates sort?
 * how should date math be applied to partial dates?
 * when should a partial date be considered part of a range query?
 * when should a date be considered part of a range query where the 
endpoints are partial?

In many cases, what people with "fuzzy" dates are conceptually dealing 
with should best be thought of not as specific "moments" (which is what 
the date field encapsulates) but as "events" consisting of multiple 
dates: start+end, or maybe start+effective+end.

So is you know *exactly* when something happened, you index it as both the 
start & end fields.  but if you only know that something happened in 1969, 
you index start=1969-01-01 & end=1969-12-31 & effective= ... whatever you 
want (Jan 1? Jun 1? Dec 31?, no value at all?).  then if someone seraches 
for "anything that happened during my lifetime: 1969-05-13T00:00:00 TO 
NOW" you can make the decision at query time wether to use the start, end, 
or effective field in your query (where hte right decision depends 
entirely on the nature of your data and your UI)


-Hoss

Reply via email to