Their will be a sharepoint list containing some words. If a word is searched in FAST search and is in that list it should not be searched.

How to do this.


The easiest is probably to create a custom core results webpart which incorporates your logic. Another option is to do it in script using csom JavaScript. Basically the same logic with different approaches.

Neither solution would be global though, but relate to the page doing the search.

  • this is what i was looking for. I have not done it before. Can you just give me any link which could guide me how to create a custom core results webpart (inherit old) in which i can read a SharePoint List. thanks @mikael-sharepoint-mvp – Varun Verma Aug 17 '13 at 9:51
  • I have some code at spsearchparts.codeplex.com. It's not exactly what you need but it inherits the core result webpart. Basically inherit the webpart, then you can for example override CreateDataSource and check HttpUtility.UrlDecode(HttpContext.Current.Request["k"]) which has the query for the terms you want to omit. If you want to show a no results type page if terms are present you can set AppendedQuery to something which will never match to make sure you get zero results. I think that should work. Or put code in pageload or createchildcontrols, as long as you intercept the query. – Mikael Svenson Aug 18 '13 at 18:27

Have you tried setting the "Allow items from this list to appear in search results?" to No? You can do that by going to your list -> List settings -> Advanced settings.

  • My Question is different. My Question is that I want to restrict some words to be searched. for example if user tries enters "blooo" a list will be checked if that list contains this word(as a title of an list item) then search should not take place. got me? – Varun Verma Aug 16 '13 at 12:35

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.