[Tracker] Some questions about tracker delete



Hi, I have several questions regarding to DELETE capability inside tracker.

Seems tracker works well with INSERT, but not that well with DELETE.

 

1, I can’t delete the nie:contentLastModified time which I manually inserted before. The below function won’t work, but it is an example in tracker wiki page

tracker-sparql -u -q " DELETE { ?f nie:contentLastModified ?unknown } WHERE { ?f nie:url <file:///home/zbt/Videos/video/ball_444.jpg> } "

 

2, I can’t *completely* delete a tag that I inserted before, after delete, only the nao:prefLabel is cleared.

INSERT works:

tracker-sparql -u -q "INSERT { _:tag a nao:Tag ; nao:prefLabel 'value' ; nao:identifier 'key' . ?object nao:hasTag _:tag } WHERE { ?object a nie:InformationElement . FILTER (str(?object) = 'urn:uuid:bc9feedf-89ce-b9ed-fdba-5300586651dd') }"

then DELETE:

tracker-sparql -u -q "DELETE {?tag a nao:Tag } WHERE {?object nao:hasTag ?tag . ?tag nao:identifier 'key' . { SELECT ?object WHERE {?object a nie:InformationElement . FILTER (str(?object) = 'urn:uuid:bc9feedf-89ce-b9ed-fdba-5300586651dd') } } }"

then QUERY:

tracker-sparql -q "SELECT nao:prefLabel(?tag) nao:identifier(?tag) ?tag WHERE {?object a nie:InformationElement; nao:hasTag ?tag . ?tag nao:identifier 'key' . FILTER (str(?object) = 'urn:uuid:bc9feedf-89ce-b9ed-fdba-5300586651dd')}"

 

the QUERY results shows tag still exists, only the prefLabel is cleared.

 

Can someone help here?

Thanks a lot!



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