Re: [Tracker] Is it possible to query by a file's modified date?



On 04/10/12 18:15, Rich Lott wrote:
e.g. If I wanted to query for "event briefing" and I wanted to limit
by files modified between a certain date range.
Could that be done with tracker's SPARQL?

Sorry, think I've figured it!

tracker-sparql -q '
     SELECT ?d ?url
     WHERE { ?f nfo:fileLastModified ?d .
             FILTER ( ?d > "2010-02-03T00:00:00Z" ) .
             ?f nie:url ?url .
             ?f fts:match "event briefing"  } ';

(I'm new to SPARQL so do let me know if this is wrong, though!)

Thanks and sorry for clogging your inboxes!


--
Rich


--
Rich Lott
IT Manager
People & Planet
Switch to renewable energy supplier Ecotricity at no extra cost and they'll donate £60 to People & Planet's climate change campaigns
http://peopleandplanet.org/ecotricity
----------------------------------------------------------------------
Email       rich lott peopleandplanet org
Direct Line 01865 264188
Phone       +44 (0)1865 264 180
Website     http://peopleandplanet.org
Twitter     http://twitter.com/peopleandplanet
Facebook    http://facebook.com/peopleandplanet
Address     People & Planet, 16-17 Turl Street Oxford OX1 3DH
People & Planet Student Activites Ltd. A charitable company.
Charity Commission 1140864 | OSCR SC043394 | English Company 06417846
People & Planet and its logo are registered trademarks.
----------------------------------------------------------------------



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]