cancel
Showing results for 
Search instead for 
Did you mean: 

search.luceneSearch: ReferenceError

cmarguello
Champ in-the-making
Champ in-the-making
Hi, im new in Alfresco, so i am trying to run a simple web script that make query through search.lucenSearch, but i have an error:

Exception: org.mozilla.javascript.EcmaError - ReferenceError: "search" is not defined.

i just do this:
      var query = "+PATH:\"/app:company_home/st:sites/cm:mysite//*\"+ALL:\"Primer\"";
      var nodos= search.luceneSearch(query);
      var numNodos = nodos.length;

I dont find why its happening.

I try to run de script
http://wiki.alfresco.com/wiki/Web_Scripts_Examples#Blog_Category_Search
Error Code Information: 500 - An error inside the HTTP server which prevented it from fulfilling the request.
Error Message: 10300112 Failed to load script 'classpath*:alfresco/site-webscripts/org/alfresco/components/dashlets/categorysearch.get.js': 10300111 ReferenceError: "search" is not defined.

But it has the same problem…


thakns for help

cmarguello
2 REPLIES 2

cmarguello
Champ in-the-making
Champ in-the-making
Hi, i can run this example in alfresco but not in share!!!!
whats the diference? im forgot something?

thamks

cmarguello
Champ in-the-making
Champ in-the-making
Finnaly i could!!!!
In the js….


    var scriptURL= "/cons/search?text="+searchText+"&site="+site;
    var connector = remote.connect("alfresco");
    var result = connector.call(scriptURL);
    model.result = result;

thanks