alfresco category searches...

本文介绍了Alfresco系统中如何使用分类路径进行精确搜索。通过示例展示了单斜杠与双斜杠的区别,以及如何仅检索文档而非类别节点的方法。对于希望深入了解Alfresco搜索机制的用户来说,本文提供了实用的技巧。

  From page 475 of the Alfresco Developer Guide…

Category searches use the PATH field, but you construct a path using the classification hierarchy. Suppose that sample-a.pdf is classified under “Languages/German”, and sample-b.pdf is classified under “Languages/German/Swiss-German”. Now consider the following two searches:
PATH:”/cm:categoryRoot/cm:generalclassifiable/cm:Languages/cm:German/*”
PATH:”/cm:categoryRoot/cm:generalclassifiable/cm:Languages/cm:German//*”
The first search will return sample-a.pdf because it is classified as “German” and the “Swiss-German” category. sample-b.pdf won’t be returned because sample-b.pdf is under a subcategory, “Swiss-German”. The second search uses double slashes (“//”) at the end to denote that matches should include “German” as well as anything classified under a subcategory. It returns both documents and the “Swiss-German” subcategory.
So the category searches, as shown above, will return both objects that have been categorized (“members”) and also the category nodes. If what you want are only documents and not categories, you can use “member” as follows:
PATH:”/cm:categoryRoot/cm:generalclassifiable/cm:Languages/cm:German/member”
PATH:”/cm:categoryRoot/cm:generalclassifiable/cm:Languages/cm:German//member”
The first search would return only sample-a.pdf, while the second search would return sample-a.pdf and sample-b.pdf.

  A handy little hack to get the Lucene full-text search query syntax is to use the web client to build your search, then save the search, then use the Node Browser to go look at the   search string Alfresco saved.

  [UPDATE: I just realized you posted this comment regarding the CMIS tutorial so this answer isn’t going to help you at all. CMIS queries don’t support categories, so, unfortunately, if   you’re using CMIS, you’re out-of-luck for now

  

转载于:https://www.cnblogs.com/chiangfai/p/6031217.html

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值