[SHA-1754] Advanced search is not taking into account the current site context Created: 23-May-14  Updated: 17-Jul-20  Resolved: 16-Sep-16

Status: Done
Project: Share Application
Component/s: Share Application
Affects Version/s: 4.2
Fix Version/s: 5.1.n

Type: Story Priority: Major
Reporter: Corentin Roux [X] (Inactive) Assignee: Unassigned
Resolution: Done Votes: 5
Labels: ENHCleanup, kanban, triaged, webappsha
Remaining Estimate: 0 minutes
Time Spent: 1 day, 1 hour
Original Estimate: Not Specified

Attachments: Text File MNT-11543.patch    
Issue Links:
is duplicated by ALF-16572 Advanced search does not respect site... Closed
is duplicated by MNT-11475 Restrict search scope in Advanced Sea... Closed
relates to MNT-18889 Please enable Advance Search scope co... Need Info
relates to MNT-13350 Search launched from site scope still... Closed
is related to by SHA-1521 Ability to limit the Live search scope Done


Using the Basic Search the scope of the search is restricted to the current site, all sites or the whole Alfresco repository.
However, the Advanced Search only searches the entire repository.
The different filtering approaches between the Basic Search and the Advanced Search are confusing to users as the numbers of search results found vary according to whether you use the Advanced Search or the Basic (due to the restricted scope of the Basic Search).
Furthermore the Repository search configuration option of the share-config should apply as well to the advance search.

[Steps to reproduce]:
1. Display a site dashboard
2. Click on the Advanced Search button (top right of screen to left of search field)
2. Enter a search term into the keywords field
3. Click on search

[Expected Behaviour]:
The advanced search should be restricted to the current site.

[Observed Behaviour]:
The advanced search is executed against the whol repository.

[Analysis to date]:
1.) By default the repository search configuration option (repository-search) of the share-config.xml is set to "context"
2.) The advsearch.get.js should be updated to initialize searchRepo at "true" only when the repository-search option is set to "always" (after that change we can still see "xx result(s) found in repository." at the top of the result list so this will need to be updated as well)
3.) Setting repository-search to "none" will allow advanced searches to be restricted to the current site but would have for side effect to make impossible searches against the repository

Comment by Jennie Soria [X] (Inactive) [ 11-Aug-16 ]

Checking on summary and status. This looks like the 'advance search' in v5.1.N as well is not able to be scoped manually in the search.


  • select pull down menu on search field top right corner select 'Advance Search'
  • you are redirected to the advance search page

There is no option to set scope on the search, it allows you to select content/folder scope, but does not allow you to set the scope of the search to repo, specific site or a specific folder.

Suggested expectation:

  • when selecting advance search option from search field top right corner of UI
  • redirect to advance search page
  • on advance search page have new selector at top with search scope default set to the location where advance search was started from


  • if they selected it while in site default set scope to site, but afford selection of repository or other site
  • if they selected it while on their dashboard set scope to reposirtoy, but afford selection of a site
  • if they selected it while in repository set scope to reposirtoy, but afford selection of a site
Comment by John Knowles [X] (Inactive) [ 06-Sep-16 ]

This is an enhancement that we will look at for a future version of Alfresco Share.

Comment by Kevin Roast [X] (Inactive) [ 13-Sep-16 ]

This is not a side-effect of SHA-1521 - this works OK on 5.1.x but SHA-1521 is implemented on 5.2 only.

Comment by Adina Parpalita [ 16-Sep-16 ]

Tested on Alfresco 5.1.2 - Pass.

  • by default, Advance Search is done based on the context and returns results from either a specific site or All Sites.
  • in order to be able to search by default in the entire Repository, the solution found is to change advsearch.get.js and set model.searchScope = "repo" .Search will be performed in the Repository, no matter what the context is. The options to change the search scope are visible.

Tested on Alfresco 4.2.N - Fail.

  • by default, Advance Search is done in the entire Repository
  • there is no visible option to use to change the search scope to All Sites or specific site.

Considering the Fix Version of this issue, marking the issue as Fixed.

Generated at Sat May 15 18:29:15 BST 2021 using Jira 7.13.15#713015-sha1:7c5ddd2c3e1709974ae9c48c17df8edd3919fe2c.