AnsweredAssumed Answered

lucendSearch against properties

Question asked by boneill on Oct 19, 2009
Latest reply on Oct 20, 2009 by nreau
Hi all,

I am trying to run a websript that has a luceneSearch in it.  Its pretty simple, it searches a single property that has been attached to images in the AVM as an aspect.  It keeps returning no results although the same query works fine in the nodebrowser lucene search.  I call it using url:  http://localhost:8080/alfresco/service/image/search?s=test.  Firstly can I use the javascript lucene search to query AVM nodes with apects attached.  All the doco seems to point that its fine.  Secondly, have I got the lucene query string wrong?  All help really appreciated.

// store and path provided as args 

if (args.s == null || args.s.length == 0) {

   status.code = 400;

   status.message = "Store is a required argument.";

   status.redirect = true;

}



var store = avm.lookupStore(args.s);

if (store == null || store == undefined) {

   status.code = 404;

   status.message = "Store " + args.s + " not found.";

   status.redirect = true;

}



[b]var avmResults = store.luceneSearch("@sim\:description:purple");
model.resultset = avmResults;
[/b]

Outcomes