0

Is it possible to ignore the "?u=" parameter in search results? When entering a search query from a specific subsite, SharePoint adds the "?u=" parameter in the url for contextual search (which is good). When I later switch to the 'People' vertical in my search center, it only search for people from that specific subsite mentioned in the u-parameter in the url.

Is there a way to ignore this only in the 'people' result page? By for example using result sources or query rules? I cannot find a solution for this. It should be kept for the other search results like documents or other verticals.

Right now I have different search result pages so I can add something specific to the people search result page if this can be a solution.

Any help or suggestions are welcome!

0

I'm not sure if it is possible to make SharePoint ignoring the GET parameters in the url. But maybe it helps just just to manipulate them by the SetUrlKeyValue() function provided by SharePoint.

http://techfindings-prem.blogspot.de/search/label/SetUrlKeyValue

0

I tried to resolve it using the SetUrlKeyValue but it didn't worked fine for me. Instead I was able to use the GetUrlKeyValue and used this to build a new url.

Using the script below, I just changed the url and let the user navigate to this automatically. The only thing that is not 100% ideal is the refresh at the end, but I think it's good for now.

var queryStringValue = GetUrlKeyValue('k', window.location.href);
var newurl = "my site link" + queryStringValue;
window.history.pushState("string", "Title", newurl);
location.reload(true);

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.