[Tracker] Syntax error in Search.Query



I'm not having much luck using the Query method.  Is there some
documentation on the api somewhere?

I'm trying to query from python with the script below, and am getting
this output from trackerd.

What am I doing wrong?


#############
#!/usr/bin/env python

import os
import sys
import dbus

bus=dbus.SessionBus()
obj=bus.get_object('org.freedesktop.Tracker','/org/freedesktop/tracker')
search=dbus.Interface(obj, 'org.freedesktop.Tracker.Search')
results=search.Query(-1,'Files',['File.Format'],'rgl','','',False,0,512)
print results
############


############
executing rdf query 
 with search term rgl and keyword 
translated rdf query is 
 Select DISTINCT (S.Path || '/' || S.Name) as uri, GetServiceName(S.ServiceTypeID) as stype , 
M0.MetaDataValue 
 FROM Services S INNER JOIN SearchResults1 M ON S.ID = M.SID 
 LEFT OUTER JOIN ServiceIndexMetaData M0 ON (S.ID = M0.ServiceID and M0.MetaDataID = 5)  
 WHERE (S.ServiceTypeID between GetServiceTypeID('Files') and GetMaxServiceTypeID('Files')) AND  
 ORDER BY M.Score desc LIMIT 0,512 

searching for rgl with smin 0 and smax 9, offset 0 and limit 999999
query  Select DISTINCT (S.Path || '/' || S.Name) as uri, GetServiceName(S.ServiceTypeID) as stype , 
M0.MetaDataValue 
 FROM Services S INNER JOIN SearchResults1 M ON S.ID = M.SID 
 LEFT OUTER JOIN ServiceIndexMetaData M0 ON (S.ID = M0.ServiceID and M0.MetaDataID = 5)  
 WHERE (S.ServiceTypeID between GetServiceTypeID('Files') and GetMaxServiceTypeID('Files')) AND  
 ORDER BY M.Score desc LIMIT 0,512  failed with error : near "ORDER": syntax error
#############




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