Modern sites are quickly filled with information. And the problem of organizing an adequate search is very urgent. Many CMS have built-in search, there are also special search scripts. But these tools create a heavy load on the server and often do not meet quality criteria. After all, a good search should be full-text, take into account the morphology of the language, reformulated and associated queries. Therefore, if the available technologies do not meet the requirements, there is no choice but to install a site search from Google.
It is necessary
Modern browser. Access to editing html-code, page templates or website theme files
Instructions
Step 1
Log into your Google Custom Search Control Panel. Open the address in the browser https://www.google.ru/cse/. Click the "Login" link at the top of the page. On the page that opens, enter your Google account credentials - email address and password. Click the "Login" button. If you don't have a Google Account yet, create one. To do this, click on the link "Create an account right now", enter the required data, confirm the registration by mail. Return to the login credentials page. Log in to the control panel
Step 2
Begin the process of creating a new custom search engine for your site. On the main page of the control panel, click the Create Custom Search Engine button.
Step 3
Set up a site search engine. Fill in the fields on the page. Enter a title, description and search area. Click "Next".
Step 4
Select the display style for site search results. Click on the icon representing the most appropriate style of search results. A Google search form will appear at the bottom. Enter a test query into it. Press the Enter key. The search results will be displayed under the form in the form in which they will be displayed on the site. If necessary, fine-tune the style of search results by clicking the "Customize" button. When finished, click the Next button at the bottom of the page.
Step 5
Get the code to set up search on the site. On the page that opens, the text field under the "Custom Search Code Embedded on the Site" contains the code intended for embedding into the site pages. Copy it to a temporary text file.
Step 6
Set up a search on the site. Edit the html code of the pages, template files, or site theme files by adding the JavaScript code obtained in the previous step to them. The code should be structurally located in the place of the web page where the search form should be located.
Step 7
Check the results. Go to the site. Make sure the search form is on the right pages in the right place. Enter a test request in the form. Click the Search button. Check for results.