[Developers] Null or before now query

Christopher R. Maden crism at metaweb.com
Fri Jan 4 01:46:25 UTC 2008


Kirsten Jones <synedra at gmail.com> wrote:
> If there is an "End Date" then you don't work there anymore.  But  
> Clint Hope (in Freebase) has an end date for working at AMI of 2030,  
> which means he still works here - but the above query says he  
> doesn't.

You can find all of my jobs that end before today with this query:

{
  "query" : {
    "employment_history" : [
      {
        "company" : null,
        "to" : {
          "type" : "/type/datetime",
          "value" : null,
          "value<=" : "2008-01-04"
        }
      }
    ],
    "id" : "/guid/9202a8c04000641f8000000003cbef5c",
    "type" : "/people/person"
  }
}

This requires that the gig have an end date, and that its value be less than or equal to today’s date.  (This does mean that a job whose end date were only “2008” or “2008-01” would compare as true, but we don’t have date-time–specific comparators yet.)

~Chris
-- 
Christopher R. Maden
Data Architect
Metaweb Technologies, Inc.
<URL: http://www.metaweb.com/ >


More information about the Developers mailing list