Take the 2-minute tour ×
SharePoint Stack Exchange is a question and answer site for SharePoint enthusiasts. It's 100% free, no registration required.

In one of my custom master page template, I have a text box where a user can search various documents from different sources (which have already being crawled...), I want to programmatically provide the search string into advanced search feature and retrieve the results and display them in my custom view. How can I access advanced search using C# and carry out what I intended. Any help would be highly appreciable.

Thanks in advance.

share|improve this question
add comment

1 Answer

You can call the search API directly using Query objects: http://msdn.microsoft.com/en-us/library/ms544561%28office.12%29.aspx

You have two options here: FullTextSQLQuery which gives you a very robust set of options and the KeywordQuery which is a simplified search. In both cases you can fully customize the display of the results.

If you generally like the normal SearchCoreResults Webpart it is also possible to override that and implement some customizations there.

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.