AnsweredAssumed Answered

Search in WebScript

Question asked by emmy on Aug 8, 2007
Latest reply on Aug 8, 2007 by davidc
Hi,
I want create a web script that search all the nodes starting from a defined node optained from the args of the script.
I can retrieve the node, but I can't use its displayPath property in the lucene search. I saw that there's also a path property but its value is undefined.


if ((args.rootId != null) && (args.rootId != "")) {
   model.root = search.findNode("workspace://SpacesStore/" + args.rootId);
} else {
   model.root = roothome;
}

var path = ???;

var queryString = "PATH:\"//" + path + "//*\" AND (TYPE:\"{http://www.alfresco.org/model/content/1.0}content\" OR TYPE:\"{http://www.alfresco.org/model/content/1.0}folder\")";

model.results = search.luceneSearch(queryString);

Thanks,
Emanuela

Outcomes