AnsweredAssumed Answered

Freemarker Lucene Search node context

Question asked by rhofkens on Jan 12, 2007
Latest reply on Jan 25, 2007 by kevinr

I'm building a template that lists all nodes of type cm:content in a space (and its subspaces).  The template looks like this

<#assign query = "TYPE:\"{}content\"" />
<#assign rowcount=0>
   <tr style='background-color: #C6D8EB'>
      <td><b>Document name</b></td>
      <td><b>Document creation date</b></td>
      <td><b>Document creator</b></td>
      <td><b>Document modification date</b></td>
      <td><b>Document modifier</b></td>
   <#list space.childrenByLuceneSearch[query] as child>
     <#if rowcount % 2 = 0><tr><#else><tr style='background-color: #DEE5EC'></#if>
       <td><a href="/alfresco${child.url}" target="new"><img src="/alfresco${child.icon16}" border=0></td>
       <td><a href="/alfresco${child.url}" target="new">${}</a></td>
    <#assign rowcount=rowcount+1>

The search results list however, includes nodes from the complete repo.  I would like limit the search scope to the current space (and subspaces), that's why I uses space.childrenByLuceneQuery.  Is this possible?

best regards,