AnsweredAssumed Answered

Problem with search.luceneSearch

Question asked by vja on Jun 16, 2008

hopefully someone can help us on this.

Brief introduction:
We have created the following ascpect which has a property with constraints. Everything works as expected.

<?xml version="1.0" encoding="UTF-8"?>

<!– Definition of new Model –>
<model name="publish:publishmodel" xmlns="">

   <!– Optional meta-data about the model –>  
   <description>Publish Model</description>

   <!– Imports are required to allow references to definitions in other models –>  
      <!– Import Alfresco Dictionary Definitions –>
      <import uri="" prefix="d"/>
      <!– Import Alfresco Content Domain Model Definitions –>
      <import uri="" prefix="cm"/>

   <!– Introduction of new namespaces defined by this model –>
      <namespace uri="extension.publish" prefix="publish"/>
      <constraint name="publish:publishFoldersList" type="LIST">
         <parameter name="allowedValues">
      <!– Definition of new publishable Aspect –>
      <aspect name="publish:publishable">
            <property name="publish:folders">
               <title>Publish folders</title>
               <index enabled="true">
                  <constraint ref="publish:publishFoldersList" />

Using this aspect we are able to add one of the list entries (TEXT_A, …) to a space or content.

The Problem:
The goal is to search for all entries (via web scripts) that are assigned to a specific list entry (e.g. TEXT_A).

The following search term works for the lucene search within the node browser.


We have tried to run it in a web script (java script) as the following:

var nodes = search.luceneSearch("\"+@\\{extension.publish\\}folders:TEXT_A\"");

Of course we have tried it with several modifications of the search term. Nothing return the respective nodes as the search in the node browser.

Hoping for help  :wink: