Advanced search on Google Sites
Enhance search on your site
Search results :
Here's an example where I let people search for files in a Drive folder:
Create the script
The 'q' parameter is very important to trigger the search from Google Sites.
Embed this script in a Google Sites page
Create a page in your site and click on the menu Insert > Apps Script
This is not mandatory but it is better to show search results directly inside your site.
Add this search engine to your site
Click on the menu More > Manage Site
Click Configure Search, select the "Advanced" tab and choose the type "Google Search Appliance" as a Search Provider
Then add the url of the page where your script is embedded as the search engine url.
You have now a new search engine on your site