private const string SERVICE = "Files";
private const string QUERY_CONDITION =
- "<rdfq:Condition>\n" +
- "<rdfq:equals>\n" +
- "<rdfq:Property name=\"%s\" />\n" +
- "<rdf:String>%s</rdf:String>\n" +
- "</rdfq:equals>\n" +
- "</rdfq:Condition>";
+ "<rdfq:equals>\n" +
+ "<rdfq:Property name=\"%s\" />\n" +
+ "<rdf:String>%s</rdf:String>\n" +
+ "</rdfq:equals>\n";
public TrackerMetadataIface metadata;
// We are performing actual search (though an optimized one) to get
// the hitcount rather than GetHitCount because GetHitCount only
// allows us to get hit count for Text searches.
+ string query;
+
+ if (this.query_condition != "") {
+ query = "<rdfq:Condition>\n" +
+ this.query_condition +
+ "</rdfq:Condition>";
+ } else {
+ query = "";
+ }
+
var search_result = yield this.search_proxy.query (
0,
this.service,
new string[0],
"",
this.keywords,
- this.query_condition,
+ query,
false,
new string[0],
false,
throws GLib.Error {
string[] keys = TrackerItem.get_metadata_keys ();
+ string query;
+
+ if (this.query_condition != "") {
+ query = "<rdfq:Condition>\n" +
+ this.query_condition +
+ "</rdfq:Condition>";
+ } else {
+ query = "";
+ }
+
var search_result = yield this.search_proxy.query (
0,
this.service,
keys,
"",
this.keywords,
- this.query_condition,
+ query,
false,
new string[0],
false,