AnsweredAssumed Answered

PATH not honored in search

Question asked by shikarishambu on Apr 13, 2010
Latest reply on Apr 14, 2010 by hsohaib
My custom webscript has a parameter "space" that defaults to "/". If a value is passed that is appended to the company_home and I want the search to only look in that folder and ones below. However, it looks like it is not honoring this. I have tried encoding the space parameter in ISO9075Encode, still no luck. It returns all docs in all folders. I am guessing I am missing something trivial/ got the syntax wrong but I can't seem to figure it. please help


//default
var space = "/";

//Pass in reference to company_home. For company_home/Inbox, say Inbox
if ((args.space != "") && (args.space != null))
{
   space = args.space;
}

var query = 'PATH:\"/{http://www.alfresco.org/model/application/1.0}company_home/{http://www.alfresco.org/model/application/1.0}'+ search.ISO9075Encode(space)+ '\"+TYPE:\"{http://www.mycustommodel.com/model/content/1.0}doc\"';


Outcomes