Uploaded image for project: 'Service Packs and Hot Fixes'
  1. Service Packs and Hot Fixes
  2. MNT-13350

Search launched from site scope still starts in Repository scope

    Details

      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

        Attachments

          Issue Links

            Activity

            Hide
            jsoria Jennie Soria added a comment - - edited

            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>
            
            Show
            jsoria Jennie Soria added a comment - - edited 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>
            Hide
            jsoria Jennie Soria added a comment - - edited

            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.

            Show
            jsoria Jennie Soria added a comment - - edited 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.
            Hide
            adavis Alan Davis added a comment - - edited

            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.

            Show
            adavis Alan Davis added a comment - - edited 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.

              People

              • Assignee:
                closedbugs Closed Bugs
                Reporter:
                rabbaspour Rosa Abbaspour
              • Votes:
                0 Vote for this issue
                Watchers:
                12 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved:

                  Time Tracking

                  Estimated:
                  Original Estimate - Not Specified
                  Not Specified
                  Remaining:
                  Remaining Estimate - 0 minutes
                  0m
                  Logged:
                  Time Spent - 2 days, 1 hour
                  2d 1h