I am trying to pass a refinement filter that I am parsing out of the url on the search page. Essentially, I want to grab the criteria in the URL and pass it to a custom webpart that executes the search and spits out a csv.
So on the url it looks like "r":[{"n":"Department","t":["\"??4875...\""],"o":"and","m":null,"k":false}]
Essentially Department is a custom refiner.
How do I pass this to the keywordquery class using the refinementfilter property?
I tried keywordquery.RefinementFilters.Add("Department:\"??4875...\"") but it didn't find anything.
So two questions -
- Is there a parser for the search string url or do I have to build one from scratch?
- How do I add the refinementfilter string correctly?
Thanks in advance,
Jake.