cancel
Showing results for 
Search instead for 
Did you mean: 

Use search.luceneSearch to search for files

yogesh_prabhu
Champ in-the-making
Champ in-the-making
Hi,

I am working with Enterprise edition 3.1
I am working with webscript examples. I got a webscript example(whitepaper) at the following link:
http://ecmarchitect.com/images/articles/alfresco-webscripts/web-script-article.pdf

I have a space named Someco under company_home. I have some files under that folder. Now i want to search for these files by their name.

I am using this syntax:

var query = "PATH:\"/app:company_home"
+"/cm:"+search.ISO9075Encode("Someco")
+"//*\" +TEXT:\"whitepaper\" ";
var whitepapers =search.luceneSearch(query);
Is this correct?

When i execute the webscript, i get a long list of errors..

Any kind of suggestions are welcome..

Thanks in advance.
1 REPLY 1

amarendra_thaku
Champ in-the-making
Champ in-the-making
use this,


var SomeCoNode = companyhome.childByNamePath("Someco"); 
currpath = SomeCoNode.qnamePath;
var query = "PATH:\"" + currpath + "//*\";
var whitepapers =search.luceneSearch(query);

hope this will resolve ur problem.

Amarendra Thakur