I'm using the smart search module, and it worked great up until now. I have some filters I'm using, not using the Smart Search Filter web part. I use querystrings and fill the search condition area in the Smart Search web part using those.
My issue is occuring when I try to filter by category. I have the selected category ID, and I only want to display documents with that category. My category field is called ArticleCategory.
I was trying to do something like +ArticleCategory:15 , but it looks as though category ids are stored as a common separated string field, so that wouldn't work. And it appears you can only do exact matches, or ranges with that syntax. I then tried to write a custom macro function, that gets all the documents given the category id, and prints out conditions for
each like:
+DocumentID:100
+DocumentID:150
etc.
Although, putting this in the condition area doesn't seem to work. I'm doing it programmatically in a macro function like:
string result = "";
foreach (DataRow dr in ds.Tables[0].Rows) {
result += "+DocumentID:" + dr["DocumentID"].ToString() + Environment.NewLine;
}
return result;
and result should be placed in the search condition area. This is not working either, I'm assuming you can only match against a field once.
Are there any other solutions I could use to filter the search results by category, I'm completely out of ideas.
If you have any other questions feel free to respond and I'll get back to them ASAP.
Thanks.