-->

Wednesday, 21 March 2012

Encode and Decode Refiner value from the Query URL

I hope you liked my previous post on "Adding Filter in the Refinement Panel of the Search Page". I was exploring more about how the Refinement works and I found out then whenever we hover over each filter on the refiner it shows the url value to be encoded.


Something like this,
https://search.com/pages/peopleresults.aspx?k=*&r=dttsource%3D%22AQpVUzpEU3RyZWV0CWR0dHNvdXJjZQEBIgEi%22


if we decode the above url, we will get something like this
https://search.com/pages/peopleresults.aspx?k=*&r=dttsource="AQpVUzpEU3RyZWV0CWR0dHNvdXJjZQEBIgEi"

k=* specifies that i have performed the Keyword search for "*", i.e wildcard search
r=dttsource="AQpVUzpEU3RyZWV0CWR0dHNvdXJjZQEBIgEi" specifies that the list of fiters we have applied

Here i cannot know which filter I actually applied. Also it was difficult to understand how the refinement panel constructs the query string by combination of the multiple filters.
But it's very important for me to know which filter I applied, So i developed a small utility which will encode as well as decode the refiner value.

Decode Refiner Value from Query URL


Encode the Refiner Value from the filter name and column value


You can download both the utility from here

Note: For some OS/Browsers you might have to rename the files to .exe extension

I hope this post and utility was useful to you.

Thank you. Happy Sharepointing !