Hello,
i'm looking for possibility how to use relativePath in Search API. I'm using this command
POST /alfresco/api/-default-/public/search/versions/1/search
{ "query": { "language": "afts", "query": "=ssl:path:'mailroom/Unfinished'" }, "paging": { "maxItems": 100, "skipCount": 0 } }
and i need to use relativePath in it. Why? It is not important, but i'm looking for how to for example get children from two different folders (and different sites) and use custom property search in the query. In the future i would like to filter results by my custom metadata.
Thanks fo help!
Solved! Go to Solution.
Do you mean something like this?
{ "query": { "language": "afts", "query": "PATH:'/app:company_home/st:sites/cm:swsdp/cm:documentLibrary/cm:Agency_x0020_Files//*' OR PATH:'/app:company_home/st:sites/cm:swsdp/cm:documentLibrary/cm:Budget_x0020_Files//*'" } }
Not sure if I understand your requirement.
You can try queries like the following to find every node in the system under a folder named test.
{ "query": { "language": "afts", "query": "PATH:'//*/cm:test/*'" } }
Hi,
thanks this works, but i need to search everything with "relativePath" = "/Sites/Storage/documentLibrary/Documents". It is possible with PATH?
And can be used something like this with searching in more paths?
{ "query": { "language": "afts", "query": "relativePath:'/Sites/Storage/documentLibrary/Documents' OR relativePath:'/Sites/Archive/documentLibrary/Files'" }
Thank you!
Do you mean something like this?
{ "query": { "language": "afts", "query": "PATH:'/app:company_home/st:sites/cm:swsdp/cm:documentLibrary/cm:Agency_x0020_Files//*' OR PATH:'/app:company_home/st:sites/cm:swsdp/cm:documentLibrary/cm:Budget_x0020_Files//*'" } }
Exactly! THANK YOU VERY MUCH!!!
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.