I have two requirement is related to sharepoint2007 search

Want to sort the results by custom property, passing value to the parameter v1 did not help, is there any other way of doing it?

Want control the number of search results, say if i click on the X, it should display 10 items but if i click on Y should display 20 items? Is it possible to do without much of coding?


Unfortunately no! Neither is possible without coding your own search results Web part or purchasing a third-party search add-on. The SharePoint search results Web part can only sort results by relevance or date - this is hard coded by Microsoft. I suspect this is because the SharePoint search engine is not really good at sorting by other managed properties. You can do it in code but you may experience strange behavior like missing results.

Changing the number of display results on the fly is also not possible without code as this is a Web part setting that can only be changed when you edit the Web part. However, with code you could probably add a hidden Web part that looks up the search results Web part on the page and adjusts the setting on each request without saving the change to the Web part.


this should give you some directions: http://philwicklund.com/blog/Pages/Using-the-Data-View-Web-Part-to-search-a-SharePoint-List.aspx

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.