AnsweredAssumed Answered

WCM Search

Question asked by mark.smithson on Jul 31, 2007
Latest reply on Aug 13, 2007 by thaiyal
I am trying to implement a search against WCM information and am almost there.

I have managed to get the content indexed to properties on a custom aspect, using the XPathMetaDataExtractor. I managed to verify this using Luke.

When I try and run a search using the web client or via the javascript search API, the content is not returned from searches.

After some digging, I have found that I can call search.setStoreUrl("avm://website") and then my queries return results, e.g

var nodes = search.luceneSearch("@\\{http\\://\\}answer:" + args.q);

However, if I then run a different search using the web scripts which does not call search.setStoreUrl(), the search still seems to be executed against the avm store indexes. i.e. the storeUrl is not reset to default each javascript is executed, implying that the search object is shared. Therefore setting the storeUrl could cause concurrency issues, obviously I want to avoid that.

Is there another way to do this, or will I need to produce my own implementation of the org.alfresco.repo.jscript.Search class and register this with the script API?