Search Result Webpart,Filter result If QueryString is present in URL
There was a requirement to filter the search result based on QueryString present in url, and if no QueryString present then should populate all the results.
Issue was simple to resolve if every time there is QueryString present, then below Query will do the job.
Below filtering the result by checking managed metadata property equals the query string value.
Above query was filtering the result based on QueryString given in URL.
However it fails if there is no QueryString present in url. "No result found" message appear. Ideally should populate all the results. And filter should be optional in query for this scenario.
So I need to modify the query and to add some condition like, if QueryString present then check managed metadata property equals the query string value, else no.
Hope you find this useful!
Issue was simple to resolve if every time there is QueryString present, then below Query will do the job.
Below filtering the result by checking managed metadata property equals the query string value.
Above query was filtering the result based on QueryString given in URL.
However it fails if there is no QueryString present in url. "No result found" message appear. Ideally should populate all the results. And filter should be optional in query for this scenario.
So I need to modify the query and to add some condition like, if QueryString present then check managed metadata property equals the query string value, else no.
To achieve this, there is syntax {searchboxquery} {? <some KQL expression> } , If MyParameter querystring is not present in URL, then just first part of KQL query will evaluate {searchboxquery}
Using this I started getting all results when there is no QueryString present in the url, and if QueryString is present then it shows filtered result.
Hope you find this useful!
https://www.accountingweb.com/profile/bestmapof
ReplyDeletehttp://www.blogtalkradio.com/bestmapof
https://ello.co/bestmapof
https://www.stumbleupon.com/stumbler/bestmapof
https://www.opendesktop.org/member/496576/
https://trello.com/bestmapof
https://hubpages.com/@bestmapof
https://vue-forums.uit.tufts.edu/user/profile/570921.page
https://www.plurk.com/bestmapof
https://www.ifixit.com/User/2480011/bestmapof
Justhost black friday deal is available on http://justhostingdeals.blogspot.com/
ReplyDeletehttps://www.kloojj.com/burnolcream
ReplyDeleteDo you want to save you time then check out the list of five stores that will gives a great discount offers on this Black Friday 2019. Grab this opportunity because this is a one time deals in a year.
ReplyDeleteLord and Taylor Black Friday Deals
Nordstrom Black Friday Sale
Tory Burch Black Friday Sale
Neiman Marcus Black Friday Sale
Gander Mountain Black Friday
Sunglasses have been much more versatile accessory that anyone can imagine. Right from protecting your eyeballs from the heat of the suns to adding a dash of charm to your style, Sunglasses have overhauled over time.
ReplyDeleteSunglasses you can gitf
Check out the latest deals and offers on this years. These deals are based on the various categories like electronic, furniture, home decor and many more.
ReplyDeleteMusicians Friend Black Friday 2019
Conns Black Friday 2019
Sam Ash Black Friday 2019
Black Friday Sam Ash
Banana Republic Black Friday 2019
Value City Black Friday 2019
Value City deals on Black Friday
Crate And Barrel Black Friday 2019
Black Friday Crate and Barrel deals
Gopro Black Friday 2019
This comment has been removed by the author.
ReplyDelete