Smart Search and Filtering

Brad Chapman asked on November 27, 2014 01:50

Hi Guys Heres is the scenario. I have implemented a smart search box on the home page of my site.

I have added a smart search filter with 2 filter items as check boxes:

+_content;Full-time;Full time +_content;Part-time;Part time

I have added a page field containing a list of keyword type items that is searchable as content. I have rebuilt my index.

The above search when performed goes to a specific search results page.

Basically I'm trying to get this to work - if the check box 'Part Time' is selected, the search goes off to the results page and displays any pages that have the text 'Part-time' in the page field.

Can I please have some tips on how to implement search filters as I'm at a loss to build this based on the example supplied and am getting no where. The addition of the check boxes does not appear to have any effect on the results of the search.

Cheers, Brad

Correct Answer

Martin Danko answered on December 17, 2014 15:11

Hi Brad,

I can see that you've been solving this with Radek in the ticket, so let post here some updated info:

Well, if your Smart search filter does not use post-back (Filter auto postback: disabled) it generates query parameters with selected filter values, e.g. &wf=2;&ws=0;&wa=0, where wf determines what option has been selected in filter. You could pass this value to page containing your smart search result web part. This page could contain also hidden smart search filter (Visible: false) which could process this query string and filter result displayed in Smart search result web part.

However, I would recommend to clone Smart search filter web part for this second hidden instance, as you may need to update its code-behind and ignore StopProcessing variable. This will be true if the web part is hidden, so it would not process the code. But, in this cloned instance you can ignore it or set it back to true.

Other option would be deveoping custom filter with complete custom functionality as per Developing custom filters

Best regards, Martin

0 votesVote for this answer Unmark Correct answer

Recent Answers

Brad Chapman answered on November 27, 2014 02:02

Also tried just indexing the actual column by setting it to be searchable and tokenized field then set the filter to: +SearchKeyWords;Part-time;Part Time

0 votesVote for this answer Mark as a Correct answer

Brad Chapman answered on November 27, 2014 02:06

The only result I see in the URL if I implement the search, filter and result on the same page is the addition of "&filter=0;" to the URL.

0 votesVote for this answer Mark as a Correct answer

   Please, sign in to be able to submit a new answer.