Try this

$services.query.hql("where doc.fullName not in (select doc.fullName
from XWikiDocument doc, BaseObject as tagObj, DBStringListProperty as
tags join tags.list tag where doc.fullName = tagObj.name and
tagObj.className = 'XWiki.TagClass' and tagObj.id = tags.id.id and
tags.id.name='tags' and tag <> '') order by
doc.fullName").setLimit(10).execute()

Hope this helps,
Marius

On Tue, Sep 3, 2013 at 12:40 PM, Volker.Lapczynski <v...@ahus.no> wrote:
> How do i get all pages without any Tags?
> Tried this without luck:
>
> {{velocity}}
> #set($tagFilter = " and NOT IN elements(prop.list)")
> #set($sql = ", BaseObject as obj, DBStringListProperty as prop where
> obj.className='XWiki.TagClass' and obj.id=prop.id.id and prop.id.name='tags'
> ${tagFilter} order by doc.fullName asc")
> ##set ($list = $xwiki.searchDocuments($sql))
>  #foreach($item in $xwiki.searchDocuments($sql))
> [[$item]]
> #end
> {{/velocity}}
>
> Volker/Oslo
>
>
>
>
> --
> View this message in context: 
> http://xwiki.475771.n2.nabble.com/all-pages-without-any-Tags-tp7586883.html
> Sent from the XWiki- Users mailing list archive at Nabble.com.
> _______________________________________________
> users mailing list
> users@xwiki.org
> http://lists.xwiki.org/mailman/listinfo/users
_______________________________________________
users mailing list
users@xwiki.org
http://lists.xwiki.org/mailman/listinfo/users

Reply via email to