cancel
Showing results for 
Search instead for 
Did you mean: 

Web script to search for nodes ?

groberts
Champ on-the-rise
Champ on-the-rise
I want to search for a node by name, cm:name = 09CA002,  but in the service/index I can't see a web script that looks like it will do.

There is a docasu script installed but it gets no results, probably because I have not got the syntax right,  could anybody help ?  I've googled around but there are not many examples of the *exact* syntax needed.

curl -v "http://???:???@???.???.org/alfresco/service/docasu/ui/search?q=@cm\:name\:\'09CA002\""

Thanks.
3 REPLIES 3

boutch55555
Champ in-the-making
Champ in-the-making
If you are doing it in javascript, you can use the following :

var album = args["album"];
var result = search.luceneSearch("TEXT:\"+album\"", "@cm:album", false);
This script comes from the POST part of my webscript (listalbum.post.js). Album is a variable sent from another webscript. It search for all indexed files that have the requested name in the property cm:album. You can just change it to @cm:name to search for names…

hope this helps… took me a while to figure out the exact syntax…

ywxiong
Champ in-the-making
Champ in-the-making
var nodes = avm.lookupNode(storeid+":"+path);

groberts
Champ on-the-rise
Champ on-the-rise
Thanks for your ideas,  I'll try to do that,  curious that there is not a ready made script though.