Faceted Smart Search results

Brenden Kehren asked on April 7, 2017 04:44

I have a site that has a smart search index for users. The users have several properties which store their values as multi-select values (Value1|Value2|Value6). I have some faceted search options created using a filter with checkboxes and a simple link button on the page which posts the page back to apply the checkbox filters I have. This all works as I expect.

The problem I'm having is I need to have no results show until a user selects some filtering options. How is this possible? I've tried all configurations of my filters and the webpart without success.

Recent Answers


Suneel Jhangiani answered on April 7, 2017 12:50

Just set the where condition in the filter to be like '1=0' until at least one of the checkboxes has been select.

0 votesVote for this answer Mark as a Correct answer

Brenden Kehren answered on April 7, 2017 16:06

Guess I didn't state this in my original question, but how do you perform this without modifying the code behind? It's possible to do this with the search textbox because you can tell it to require text. But not possible with any other kind of filter control without some code modifications.

0 votesVote for this answer Mark as a Correct answer

Zachary Perry answered on April 7, 2017 22:56

Maybe use some JavaScript to disable the submit button until some of the filter options are completed. Then use the searchtext with the post back somehow, or visibility based off it being posted back with a querystring value of some sort. Might be more work than modifying the code behind tho.

0 votesVote for this answer Mark as a Correct answer

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