[MNT-13350] Search launched from site scope still starts in Repository scope Created: 13-Feb-15  Updated: 07-Apr-16  Resolved: 19-Mar-15

Status: Closed
Project: Service Packs and Hot Fixes
Component/s: Search and Indexing (non-UI)
Affects Version/s: 5.0.0.3, 5.0.0.6
Fix Version/s: 5.0.1

Type: Service Pack Request
Reporter: Rosa Abbaspour [X] (Inactive) Assignee: Closed Bugs
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: 0 minutes
Time Spent: 2 days, 1 hour
Original Estimate: Not Specified
Environment:

solr4


Issue Links:
Cloners
is cloned by AKU-140 CLONE - Search launched from site sco... Closed
is cloned by SHA-1521 Ability to limit the Live search scope Closed
Dependency
Depended on by AKU-186 CLONE - Faceted search: current Site ... Closed
Duplicate
Related
is related to by ACE-1469 Search from any site's page initializ... Closed
is related to by SHA-1754 Advanced search is not taking into ac... Closed
Bug Priority:
Category 3
ACT Numbers:

00317235, 00330819, 00425975

Build Location: https://releases.alfresco.com/Enterprise-5.0/5.0.1/build-00068/

 Description   

Search launched from site scope still starts in Repository scope

Steps to reproduce:
1- Log in to Share and create a file in "Repository" (e.g. "Repository" > "test1.txt)
2- Create a file with the same name in document library of a site (e.g. "site1" > document library > "test1.txt)
3- In the site (site1) search the file (test1)

Expected behaviour:
Search results will be constrained to that site. Therefore it only displays the file in that site.

Observed bahaviour:
Search results in the live search drop-down will be for the entire Repository not constrained to that site. Therefore it displays both files.

However the option to set the search for that particular site in advanced search page is available.

Analysis to date:

  • This issue has been reproduced in Alfresco version 5.0.0.3, Solr4
  • The default value for repository search configuration in share-config.xml is set to "always-options".
    Changing this value to "context" doesn't perform the search based on the current context:

<config evaluator="string-compare" condition="Search">
<search>
<!-- Repository search configuration option -->
<!--
The 'repository-search' config element value can be one of:
none - disable repository wide search option
context - search depending on current context, including repository, all sites, current site (default)
always - always search full repository no matter what the context, disables search context options
always-options - always search full repository no matter what the context, still shows the search context options
-->
<repository-search>context</repository-search>
</search>

Business case:
Its a very important criteria to have context search for the customer.
And in the meantime please advise if there is any quick fix for getting context search back



 Comments   
Comment by Jennie Soria [ 19-Feb-15 ]

Test case: Alfresco Enterprise v5.0.0 (.6 r96365-b25) schema 8010, SOLR4

  • Basically, this is an improvement request to re-implement configuration of setting contextual search with 'live search'. Prior to implementation of 'live search' (also noted in the ToK for 'live search' in 5.x), simple search was contextual (default in 4.2.x) and configuration is not applicable to 5.x 'live search'.
  • The decision of whether or not this pre 5 configuration should be applicable to the 'filtered search' (i.e. advance) page is still under improvement discussions in MNT-11543.
  • As this configuration is no longer a valid configuration for 5.x (live search) it should probably be remove from the configuration (share-config.xml) in the builds or at least comment updated to indicate its deprecated, if it is no longer applicable

Regardless of configuration defined in the share-config-custom.xml for the <repository-search> setting ((none,context,always, always-option: listed in the configuration comments), the live search does not change its listing results nor does it have any impact on the 'filter search' (i.e. advance) list view.

   <config evaluator="string-compare" condition="Search">
      <search>
.
.
.
         <!-- Repository search configuration option -->
         <!-- 
              The 'repository-search' config element value can be one of:
              none - disable repository wide search option
              context - search depending on current context, including repository, all sites, current site (default)
              always - always search full repository no matter what the context, disables search context options
              always-options - always search full repository no matter what the context, still shows the search context options
         -->
         <!-- default <repository-search>always-options</repository-search>  --> 
        <repository-search>context</repository-search>
      </search> 
.
.
.
  </config>
Comment by Jennie Soria [ 19-Feb-15 ]

This functionality change was a natural change with the implementation of 'live search' versus the old 'simple search'. Live search actually does render the site information in the search results which the user can see to reduce or select by site.

The redirect on entry of search text, to the 'filtered search' (advance) page does provide the context(site) in the pull down selection list but it defaults always to the Repository list view of results.

I would think it should at least default to the context (site) result list view, at least, as did in its predecessor in 4.2.x.

Whether or not control configuration is viable or necessary with new search implementation is another question.

I believe this should be a improvement request but, regardless of the major search function change, it can also be considered a regression since it did allow filtering. So at this point jira has been set to SP bug - regression.

Comment by Alan Davis [ 10-Mar-15 ]

With Aikau 1.0.8 (in Alfresco 5.0.1) it is possible for a customer to provide an extension module to reconfigure the SearchBox default behavior. This can be done by setting the "site" configuration attribute is set to the site context, e.g.

var searchMenuBase = widgetUtils.findObject(model.jsonModel.widgets, "id", "HEADER_SEARCH");
searchMenuBase.config.site = page.url.templateArgs.site;

QA, please test the default behavior can be changed in this way.

Generated at Thu Dec 13 16:20:23 GMT 2018 using JIRA 7.6.3#76005-sha1:8a4e38d34af948780dbf52044e7aafb13a7cae58.