Quantcast
Channel: SharePoint 2013 - Development and Programming forum
Viewing all articles
Browse latest Browse all 7589

Search keywordquery refinementfilter from URL

$
0
0

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 - 

  1. Is there a parser for the search string url or do I have to build one from scratch?
  2. How do I add the refinementfilter string correctly?

Thanks in advance,
Jake.



Viewing all articles
Browse latest Browse all 7589

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>