3

I have folders in share shared folder. Is there any way to specify share to search for a particular file in particular folder of the shared folders?

samnaction
  • 1,194
  • 1
  • 17
  • 45

3 Answers3

4

Yes, but there is no user friendly out of the box solution (I know of).

As admin, go to http://your-host.domain.name/share/page/console/admin-console/node-browser and execute a (fts-alfresco) search like the following:

PATH:"/app:company_home/app:shared//*" AND @cm\:name:"filename.txt"

This will find all files named "filename.txt" below the shared folder.

I guess you will have to customize the search UI if you want to offer that functionality in a user friendly fashion or to non admin users.

Further details are at http://wiki.alfresco.com/wiki/Search#Path_Queries

Andreas Steffan
  • 6,039
  • 2
  • 23
  • 25
  • I am planning to implement for non admin users can you provide me a link on it. – samnaction Apr 08 '14 at 11:48
  • It very much depends where you want to implement this and how you want users to choose a path/multiple paths. Personally, I would consider extending the advanced search. – Andreas Steffan Apr 08 '14 at 12:06
3

We've developed a solutions where you can search within a folder through the advanced search form: http://addons.alfresco.com/addons/alfresco-share-folder-search

It's free for download so you can look around how it's done.

In short: in 4.2.e you can send an extra param rootNode to the /slingshot/search repo webscript.

If you check the client side JavaScript in Share components/search/search.js

There is method _buildSearchParams The following params are send: site={site}&term={term}&tag={tag}&maxResults={maxResults}&sort={sort}&query={query}&repo={repo}&rootNode={rootNode}&pageSize={pageSize}&startIndex={startIndex}

So fill in the rootNode with a qnamePath or NodeRef and it will present the results of that folder.

Tahir Malik
  • 6,623
  • 15
  • 22
0

For a possible implementation, I wrote a long post about it on the alfresco community forum .

boumbh
  • 2,010
  • 1
  • 19
  • 21