How can I use the tool to simulate a CSWP?

Jun 29, 2015 at 4:05 AM
If yes, how? Thank you.
Coordinator
Jun 29, 2015 at 6:30 AM
You can enter the query template into the query template field of the tool, and the query itself if you want in the query text. Then click Run and you should see the same results as in CSWP.

You can also choose which result source you are using by using the Result Source Id field.

Hope this helps.
Jan 28, 2016 at 3:51 AM
If you edit the source of the page you have the CSWP on and go down to the bottom section of the page source, you will find some script sections. There will be one that corresponds to your CSWP (if you are getting 0 results in your CSWP you will see a section that corresponds to the results and has something like ResultCount:0. You will need to look through the javascript to find your CSWP search query (I find that's the best way to find it). In that bit of code you will find there is a QueryTemplate, ResultSourceId, and some other parameters that are useful to paste into the Search Query Tool depending on your needs. The parameters are generally named in the same way as the inputs in the Search Query Tool so it's nice and easy to figure out which ones are relevant. Hope it helps

Andrew