Google Custom Search : Java Glossary

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="http://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

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.

Add-in editor for Google Chrome
affiliate
Android
banner
Blogger
console
Copernic: free desktop index and search
feedburner
Gmail
Google
Google Accelerator
Google AdSense
Google advanced search operators
Google Adwords
Google Affiliate network
Google Books
Google checkout
Google Chrome
Google code: source code hosting
Google Codesearch: search open source
Google Desktop
Google Docs: collaborative documents
Google docs: shared whiteboard
Google Downloads : Google downloadable software e.g. Google Desktop, Google Earth, Google Talk, plus free Norton Antivirus, Firefox, Acrobat etc
Google Earth
Google Gears
Google Groups
Google Guide
Google Latitude
Google Search
Google search tips
Google Sites: collaborative websites
Google Toolbar
Google Translate
Google Video
Google Video: video hosting
GoogleGuide advanced search operators
iGoogle
installing Java
installing Java Web Start
KWIC
language codes
latitude
lmgtfy: mini Google tutor, a polite RTFM
longitude
Lucene: free desktop index and search
Miva: a competitor to Adsense
PodSync TweakGDS
rich snippets: preparing data for search engines
search engines
Subversion

CMP homejump to top You can get the freshest copy of this page from: or possibly from your local J: drive (Java virtual drive/mindprod.com website mirror)
http://mindprod.com/jgloss/googlecustomsearch.html J:\mindprod\jgloss\googlecustomsearch.html
logo
Please email your , letters to the editor, errors, omissions, typos, formatting errors, ambiguities, unclear wording, broken/redirected link reports, suggestions to improve this page or comments to Roedy Green : feedback email. If you want your message, your name or email kept confidential, not considered for public posting, please explicitly specify that. Unless you state otherwise, I will treat your message as a letter to the editor that I may or may not publish in the feedback section. After that, it will be too late to retract it. If you disagree with something I said, please quote it and cite the web page where you found it, tell me why you think it is wrong, and, if possible, provide some supporting evidence. Threatening to kill me or spouting obscenities has yet to persuade me to change my mind.
mindprod.com IP:[65.110.21.43]
view BlogYour face IP:[38.107.179.212]
You are visitor number 11.