1

I would like to pass a refiner value from one page to the search page using query string. The refiner's name is: services.

How do I construct the query string?

I found this, but it does not make any sense to me: Interpret Search with refiners url query string

1

2 Answers 2

1

This is the anatomy of the json url that is searching via keyword and refiner:

http://your-site/Search/Pages/Results.aspx#Default={"k":"custom refiner","r":[{"n":"FileType","t":["equals(\"docx\")","equals(\"doc\")","equals(\"docm\")","equals(\"dot\")","equals(\"nws\")","equals(\"dotx\")"],"o":"or","k":false,"m":null},{"n":"DisplayAuthor","t":["\"ǂǂ456c696f20537472757966\""],"o":"and","k":false,"m":null}]}

Where:

k: keyword; r: refinement filter; n: refiner name; t: refiner tokens; o: operator (and, or); k: use KQL (Boolean); m: this is the token to display value map. It's used when a custom refinement value (textbox) is used. This stores the value that you inserted, to visualize it in the refiner. Example: "m":{"equals(\"Item Value Text Box\")":"Item Value Text Box"}

The url in the browser will be url encoded. You must use a tool like:

https://meyerweb.com/eric/tools/dencoder/

To decode your URL

0

Use https://www.url-encode-decode.com/ to decode your URL and add custom filters :

k: keyword; r: refinement filter; n: refiner name; t: refiner tokens; o: operator (and, or); k: use KQL (Boolean); m: this is the token to display value map. It's used when a custom refinement value (textbox) is used. This stores the value that you inserted, to visualize it in the refiner. Example: "m":{"equals("Item Value Text Box")":"Item Value Text Box"}

Final URL will be :

https://yoursite.sharepoint.com/sites/Yoursite/Pages/Custom.aspx#Default={%22k%22:%22search%20keyword%22,%22r%22:[{%22n%22:%22RefinableString02%22,%22t%22:[%22equals(\%22refiner%20value\%22)%22],%22o%22:%22and%22,%22k%22:false,%22m%22:null}],%22l%22:2057}

From decoding in https://www.url-encode-decode.com/ , it will be like :

https://yoursite.sharepoint.com/sites/Yoursite/Pages/Custom.aspx#Default={"k":"search keyword","r":[{"n":"RefinableString02","t":["equals("refiner value")"],"o":"and","k":false,"m":null}],"l":2057}

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.