How can I find alfresco empty foldres using Lucene Query

℡╲_俬逩灬. 提交于 2019-12-13 03:49:34

问题


I want to retrieve the list of folders in a specific node whose list of childrens is empty using Lucene query.

I create this query:

+PATH:"/app:company_home/cm:contexts/cm:ctx_exploitation/cm:runs/cm:Run_322645//."+Children is empty.

but it does not give good results.

What is the right Lucene syntax to do this


回答1:


There is no way to find empty folders using a Lucene query. However, there are some java services and javascript APIs in alfresco like 'FileFolderService' in Java and 'childByNamePath' in javascript, using them you can write your logic and find empty folders.




回答2:


You can find o bytes file using below lucene query.

TYPE:"cm:content" AND @cm:content.size:0



来源:https://stackoverflow.com/questions/54902243/how-can-i-find-alfresco-empty-foldres-using-lucene-query

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!