SmartSearch how to append a WHERE condition?

Victor Hugo Garcia asked on August 21, 2014 21:30

Hello friends,

I'm creating a custom web part and I added the Search Results Module into the ASCX, and All is working as expected with keywords, etc.

However, I'm setting up some Filters by category to select in a different Logic for example:

Group 1 (Multiselect) CheckboxList Option A Option B Group 2 (Multiselect) CheckboxList Option C Option D

I would like the logic to be: ((Option A OR Option B) AND (Option C OR Option D))

For categories. I already built a "where" string that generates the mentioned logic above, however, how can I send this value to the Search Results "module" ?

Any hint is always welcome.

Thanks

Correct Answer

Yehuda Lando answered on August 21, 2014 22:04

You need to use the lucene syntax. Take a look at this and this

0 votesVote for this answer Unmark Correct answer

Recent Answers


Victor Hugo Garcia answered on August 22, 2014 00:04

Thank you so much, it helped me a lot.

Just for the record for other users that could have the same issue: Tool suggested for debugging Lucene: Luke

srchResults.FilterSearchCondition = where;

Where is a variable that contains the Lucene syntaxis (Luke will help with this).

0 votesVote for this answer Mark as a Correct answer

Yehuda Lando answered on August 22, 2014 20:05

Nice tool, thanks.

0 votesVote for this answer Mark as a Correct answer

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