Question

I guess this is a desired behaviour, but I am trying to overcome it - I searched around and nobody complains from the same thing.

I have a search results page that contains the core search results web part. When searching for the word 'test', the url looks like so: http://xxxx.com/SitePages/Results.aspx?k=test

and results are displayed if they match my keyword 'test'.

But if a person goes directly to the page, without searching for anything: http://xxxx.com/SitePages/Results.aspx, then all results are displayed on the page, which is undesirable behaviour.

Is there a property where I can hide these results until a proper search is performed?

Thanks in advance!

Was it helpful?

Solution

This is not the out of the box behavior. Hitting the results page with out a keyword parameter should result in a blank page. I am using the Enterprise Search Center site template. My results page is under /pages/results.aspx. Testing with a Basic Search center ressults in the same thing. I get no results without a keyword parameter.

Looking at your URL it appears that you have crearated your own results page in SitePages. I suspect that in configuring the Results web part you added some parameter that is causing the query to fire in spite of the keyword parameter.

Test the behavior with an OOB search site and then compare the web part properties.

Licensed under: CC-BY-SA with attribution
Not affiliated with sharepoint.stackexchange
scroll top