cancel
Showing results for 
Search instead for 
Did you mean: 

Lucene Query for applied category and paths

robertoroberto
Champ in-the-making
Champ in-the-making
Hi, I need a lucene query that returns all documents  in folder "Company Home/User Homes/c02" with applied catagory "mycategory".
Can you help me?
1 REPLY 1

mikeh
Star Contributor
Star Contributor
Hi

You need something like:
PATH:"/app:company_home/app:user_homes/cm:c02//*" AND PATH:"/cm:categoryRoot/cm:generalclassifiable/cm:mycategory/*"

You'll need to edit the "cm:mycategory" path if it's in a subcategory.

Incidentally, if you enable SearchContext debugging:
log4j.logger.org.alfresco.web.bean.SearchContext=debug

and then construct the search using the Advanced Search in the web client, you can see the Lucene query that's executed.

Thanks,
Mike