AnsweredAssumed Answered

Lucene search by space type

Question asked by sergi.l on Apr 23, 2009
Hi all!

Quick question:
I want to retrieve all the spaces belonging to the corresponding type. Then, I've coded the following Lucene search:
Nevermind the selected language
- Java Web Service
          queryString =    "+TYPE:\"" + Constants.createQNameString(MyModel.NAMESPACE_CONTENT_MODEL, SMSModel.TYPE_SPACE) + "\";
- JavaScript
<#assign subContent=companyhome.nodeByReference[args.h].childrenByLuceneSearch[" +TYPE:\"msm:mySpaceType\" AND @\\{http\\://www.msm.com/model/content/1.0\\}Code:'+param1+""]>
(This is the same plus a property filter.)

The result would be all the spaces that belong to this type. OK!
But my Alfresco model uses extended types, and there is a subtype (mySubSpaceType) that extends from "mySpaceType" and also will be retrieved. The model is fine because the subtype must contain the parent properties.

How could I change the lucene search to retrieve only the parent space?? (Without the child types)
Thanks in advance.

Regards,
Sergi

Outcomes