Search is no longer context aware in Alfresco 5

During testing an upgrade from Alfresco 4 to Alfresco 5 we noticed that searches are no longer context aware in Alfresco 5. Before Alfresco 5, if you made a search from within a site, then the default action was that results were also scoped to the site. This no longer happens in Alfresco 5. There is a Jira for this:, however the solution proposed in the comments wouldn’t work for me. The correct code to get the search to be context aware again would be to put the following code snippet in your extended share-header.get.js.

 Set default search scope to site:

function setDefaultSearchScopeToSite() {
  var searchMenuBase = widgetUtils.findObject(model.jsonModel.widgets, "id", "HEADER_SEARCH");
  // =; //Does not work
  searchMenuBase.config.defaultSearchScope =;

Perhaps something changed in the Aikau framework after this issue was tested which introduced this regression error.

My reflection is, why isn’t the default behaviour of the search that it should be context aware? Isn’t that what people want? Or at least make this configurable in a simple way instead of requiring extending a web script controller.

There are a few other issues relating to this such as scoping the live search and advanced search:,

This entry was posted in Alfresco, share, Solr, Uncategorized. Bookmark the permalink.

7 Responses to Search is no longer context aware in Alfresco 5

  1. Brian Knoblauch says:

    Example code given does not work for me. I’ve got a share-header-get.js override that I merged it in with. My custom modifications to the header show up fine, but the search scope change does not happen. It still searches outside of site scope. Test platform is Alfresco 5.0a.

  2. Trevor says:

    The code works but breaks searches executed outside the scope of a site.
    An if statement will insure the proper scope is chosen depending on where you are.

    function setDefaultSearchScopeToSite() {
    var searchMenuBase = widgetUtils.findObject(model.jsonModel.widgets, “id”, “HEADER_SEARCH”);
    // =; //Does not work
    if( != null){
    searchMenuBase.config.defaultSearchScope =;

  3. Advantages Related too Picking head soccer hack Instrument

    Head Soccer – here is the particular vvideo game
    that iis essential to attempt in case you’rea fann regarding soccer video game
    titles and aare seeking a completely fresh experience.
    The concept is obviously straightforward. It is really a one-on-one, mobile gamne
    where you truly require too test out and
    gget the ball into the actual other model’s goal.
    This game is actually displayed in 2nd. That’s why
    yyou are going to bbe viewing thhe exact gameplay coming frfom the actual side.
    The mobile game will probably be named Head Little
    league, because the the majority of special characteristic associatfed with the players you actually
    command are actually their paarticular brains.

    These are ddisproportionately significant.
    The actual video ame iis without issue really straightforward
    to interact with in. It is doable to relocate the player using easy to use controls.
    On the base right-hand aspect, you’ll find a button to be able to kick as well
    as a buttn to jump. This seems a breeze, yet once you play your initial game you’ll be able to rapidly discover thee key reason why this online
    game is undoubtedly thus challenging to know. The soccer ball jumps all over the screen at breakneck rates and you can be flying in all directions along with it.

    1 / 2 of times, whenever you in fact score, it is nothing to use along with
    experience, but it’s simply the fortune regarding where by the particular
    basketball comes. You will alsoo be capable tto choose betweeen a compleye of 4 online game modes.
    And each and everyy game method will demand different goals so as to end up being accomplished eevery single child alllw
    you possess great results.
    During the entire video game you’ll swiftly discover the point
    that when you victory a match, you’ll be given 100 dollars.
    Those coins could possibly be utilized tto un-lock all types of stuff
    like new in addition to different players including their strong power shots.
    You’ll be able to naturally, just like another totally free activity, buy coins immediately by way off
    in-app purchase. However it’s likewise achievable to work with
    head soccer cheatss and avoid totaally wasting your hard earned dollars.
    head soccer hack apk is precisely what you’ll require to receive just in case yyou want tto enable the exact using of the exact cheats.
    There will never be any need to help devote your challenging earned dollars once acquiring this app and you’ll obtain every one of the coins you mayy everr need.
    That will certainly create the video game a great deal more exciting.
    And thus, thee reason the reason limit oneself – just
    make use of the particular hack and love the actual game.

    There’s no denying the beief that Head Soccer is without quesdtion the mobile game that is the actual
    choice available foor yyou if perhaps you will be on the watch foor somethging fascinating.

    It possesses fast, hectic games, this can be a breeze to discover
    the best way to engage inside, and thee particular images are really adorable along having
    humorous. Mastering this mobile game is required a loong time and
    there is no questioning concerning this particular nevertheless if you’re seeking an amazing cell phone
    game then this happens to be a wonderful choice.

  4. Great blog! Do you have any recommendations for aspiring writers?
    I’m hoping to start my own website soon but I’m a little lost on everything.
    Would you propose starting with a free platform like WordPress or go for a paid option? There are so many choices
    out there that I’m totally overwhelmed .. Any suggestions?
    Appreciate it!

    My web blog spilleautomater p㟮ett

  5. norske says:

    It’s amazing to visit this website and reading the views
    of all mates on the topic of this article, while I am also
    zealous of getting knowledge.

    my page norske

  6. suba me says:

    RNLoZF Wow! This could be one particular of the most helpful blogs We ave ever arrive across on this subject. Actually Great. I am also a specialist in this topic so I can understand your hard work.

Leave a Reply to Brian Knoblauch Cancel reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>