- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎03-31-2020 03:28 PM
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!
- Labels:
-
Alfresco Content Services
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎04-01-2020 09:37 AM
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//*'" } }
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎04-01-2020 07:35 AM
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/*'" } }
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎04-01-2020 07:55 AM
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!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎04-01-2020 09:37 AM
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//*'" } }
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎04-01-2020 10:11 AM
Exactly! THANK YOU VERY MUCH!!!