Hi all,
I need to implement an afts query that find all the documents that have a PATH like this:
/app:company_home/st:sites/cm:site1/xxxxx/…/MYCUSTOMFOLDERNAME/xxxxx”
I already used these kind of query before using wildcards like this:
TYPE:"cm:content" AND PATH:"/app:company_home/st:sites/cm:site1/xxxxx/MYCUSTOMFOLDERNAME//*"
but I need that the xxxxx value could be any folder, not a static one (ex. /documentLibrary/AnotherStaticFolder/...).
I tried creating a query like this but I have no results:
TYPE:"cm:content" AND PATH:"/app:company_home/st:sites/cm:site1//*//MYCUSTOMFOLDERNAME//*"
Probably I'm asking an impossible question but I want to know if someone has any suggestion.
Instead of this I already have a workaround where I found all the folder named MYCUSTOMFOLDERNAME and create for each a different query like this:
TYPE:"cm:content" AND ANCESTOR:"EACH-FOLDER-NODEREF-HAVING-MYCUSTOMFOLDERNAME"
Thanks in advance.
Solved! Go to Solution.
ANCESTOR is definitively the most performance approach.
Anyway, I've tested this AFTS query and it works for default Alfresco data.
PATH:"/app:company_home/st:sites//*/cm:Presentations//*"
ANCESTOR is definitively the most performance approach.
Anyway, I've tested this AFTS query and it works for default Alfresco data.
PATH:"/app:company_home/st:sites//*/cm:Presentations//*"
Hi Angel,
thanks for answering my question.
I found out that I added an extra slash ("/")
TYPE:"cm:content" AND PATH:"/app:company_home/st:sites/cm:site1//*//MYCUSTOMFOLDERNAME//*"
That query now is running correctly.
But I've another problem that probably can't be solved.
MYCUSTOMFOLDERNAME is composed like this -> "[id.id.id] FolderName" so I was trying to replace that [id.id.id] with another * like below:
TYPE:"cm:content" AND PATH:"/app:company_home/st:sites/cm:site1//*/*MYCUSTOMFOLDERNAME//*"
This is the real case where I have no results.
Anyway, I know that the ANCESTOR is the best approach if we prioritize our server performance but my query will be necessary only for statistics purposes, so it will be run only few times for year and manually by an admin user.
Ask for and offer help to other Alfresco Content Services Users and members of the Alfresco team.
Related links:
By using this site, you are agreeing to allow us to collect and use cookies as outlined in Alfresco’s Cookie Statement and Terms of Use (and you have a legitimate interest in Alfresco and our products, authorizing us to contact you in such methods). If you are not ok with these terms, please do not use this website.