Google Custom Search : Java Glossary

*0-9ABCDEFGHIJKLMNOPQRSTUVWXYZ (all)

Google Custom Search  Google Custom Search

How do you create custom Search Boxes that have built-in keywords, limits to particular sites or a particular look and feel? Even without using Google’s custom search feature, you can compose a custom text-link search with the search keywords built-in so the person only has to click like this: Google Easter search which looks in HTML (Hypertext Markup Language) like this:

<a href=https://www.google.com/search?q=rabbits+eggs>Google Easter search</a>
You can make up a link to any search you want just by typing it on in the Google command line, then pasting the URL (Uniform Resource Locator) Google converts it into as the href, converting every & to &amp; (possibly by using Amper).

You can also set up a search box form where the user types the search keys, where it searches only your site. See these examples.

You want Custom Search not SiteSearch. SiteSearch is quite expensive and entails installing search engine software on your server. SiteSearch gives up to the second relevancy since you don’t have to wait for Google to spider. It is intended for businesses.

Google has a scheme to make it easy to set up custom searches just by asking questions on their website. The features include:

Disadvantages

At some point Google will drop support for my style and I will have to improve my markup.

New Style Custom Search

In the new style custom search, you have many more options, but you don’t specify them in the HTML. Your selections remain on file with Google. This leads to simpler HTML to invoke, but it also gives Google more control over what you do.

The CMP (Canadian Mind Products) search box above is generated with the following HTML :

Here is a typical example that searches just http://mindprod.com/kjv where the text of the King James bible is located.

Search King James Bible

To search The King James bible for an exact phrase, enter it in quotes, e.g. "hand of the poor and needy"

To search for words used together in a chapter, enter the words without quotes e.g. wrestled angel Jacob

Here is the HTML for the search box:

Note there is no reference to kjv or mindprod.com in it anywhere. The 005260666645288681202:f8um2hwp-ho is a reference to the information about the search stored on Google. That snippet would thus work on any website.

You can safely modify the line:

<input type="text" name="q" size="55">

to increase or decrease the size of the box you fill in.

You can safely modify the line:

<input type="submit" name="sa" value="Search Oracle">

To change the text on the search button.


This page is posted
on the web at:

http://mindprod.com/jgloss/googlecustomsearch.html

Optional Replicator mirror
of mindprod.com
on local hard disk J:

J:\mindprod\jgloss\googlecustomsearch.html
Canadian Mind Products
Please the feedback from other visitors, or your own feedback about the site.
Contact Roedy. Please feel free to link to this page without explicit permission.

IP:[65.110.21.43]
Your face IP:[3.149.230.44]
You are visitor number