GoogleCSE

From UBC Wiki

Tutorial for creating a Google Search Engine with Locally Loaded Results

Here is an example of the outcomes of creating a Google Search Engine and the added functionality to load the results locally.

GoogleCSE.jpg

Instructions:

Part 1: Get the Google Search form to work with the few sites you type in.

Creation phase:

  1. First off, visit http://www.google.ca/cse/ . You need a Google account in order to create a Google Custom Search Engine (CSE). Once you have created one, press the “Create a Custom Search Engine” button.
  2. After logging in, you will be in step 1, set up your search engine by:
    1. Enter a meaningful Search Engine Name and Description.
    2. Choose “Only sites I select.” in order to be able to load a subset of sites to be searched upon using your search engine.
    3. For now, you can fill in the “Sites to Search” with some of the sites you planned to put in your search engine. This method will allow max 5,000 links across all your search engines within the account.
    4. You have the option of including all pages on the entered sites or just a specific page. Click on “Tips on formatting URLs” for more information, but it is recommended not to include large amount of sites to your search engine at this time. See part 2 for simple methods.
    5. The standard edition is sufficient and there is a bypass for the ads coming up below. Agree and click next.
  3. In step 2, try out a search on the sites you’ve added and see how it works out, then click finish and choose to get a confirmation email if you desire.
  4. You should see your search engine under “My Search Engines” and now the next section will discuss the settings under “control panel”

Settings modification phase:

  1. After clicking “control panel” beside the search engine you desire to modify, you will be in the basic information tab. Scroll down to the preferences and select the button for, “Do not show ads on results page (for registered....)” because the ads are removed for universities. Save changes to this.
  2. Next, on the left menu bar, select “Look and Feel” and under Choose a hosting option, select “Iframe”. Next, choose one of the default styles or create your own style and modify the “Global styles, Search Controls, and Results” as you want them to appear on your page. There is a handy preview of your changes below that section for you to test on. Save changes to this.
  3. Finally, on the left menu bar, select “Get code” and copy and paste both the search box code and search results code in the order they are displayed onto your HTML platform and test to ensure this works as we set it up to.
  4. Your search form and the results should be working exactly as you set them up. If you want to make modifications, simply go to the control panel of your engine and modify your search as you wish and replace the old code you inserted with the new to see the changes!

Part 2: Adding additional links to your search engine.

Note: There are a few ways to add more links once you have set up your engine. Each method have benefits and drawbacks, so choose a method that would suit your needs.

Direct insert

This method directly inserts link to your search engine by going into the control panel. This is best for adding large amounts of link that are in a form of list, however, Google will only support up to 5,000 links.

  1. Go to http://www.google.com/cse/manage/all and click on “control panel” for your search engine. You must be logged on to your Google account.
  2. On the left sidebar, click on “Sites” and then click the “Add Sites” button. Pressing this button will cause a window to pop up. Enter the URL of the link you want to add in the “URL” field.
  3. In the “What to include” field you would want to select “Include all pages…” for the search engine to search through the entire site of the entered URL. If you want the search engine to search a specific page, then click “Include just this specific page….”
  4. To add a large list of link to the search engine, click “Include sites in bulk” at the top left of the window. You can then enter URLs of all the link you want to include (one URL per line).
  5. Click “save” when you are done. Go to your search engine and test if the modifications have been implemented.

Insert via Google Marker

This method requires you to visit every site you want to bookmark and is not recommended for adding large quantities of sites.

  1. First login to Google and go to http://www.google.com/cse/manage/all. On the left sidebar click on “Google Marker”.
  2. Follow the short guide that Google provides on how to use Google Marker. Once you have Google Marker set up, you can add sites to your search engine without having to go to Google.

Insert via Wiki

This method allows you to include more than 5,000 sites to your search engine and it does not require you to directly login to Google to add sites.

  1. Create a Wiki page and list all the sites you wish to include in your search engine. Make sure that all the sites are hyperlinked correctly.
  2. Next, go to the control panel of your search engine. You can access it through here: http://www.google.com/cse/manage/all.
  3. Click on “Sites” on the left sidebar and then click the “add sites” button. Enter the URL of your Wiki page and then click the setting “Dynamically extract links…” and beneath that click “Include all partial sites this page links to”.

Reference:

Here’s a great online tutorial: http://onlamp.com/onlamp/2007/09/06/creating-google-custom-search-engines.html - by ONLamp



Tutorial for integrating UBC OER Search engine

Instructions:

Part 1: Get the UBC OER Search to work on your platform.

  1. First, you need to get the search bar on your platform. Copy and paste the code from here to where you want your search bar to appear. The code should look like this:
  2. <script type="text/javascript" src="https://apps.olt.ubc.ca/opened/openedsearch.js"></script>
  3. Now check your web page to see if you have the correct results:
  4. UBCOERWIDGET.jpg
  5. Test the search bar by entering a keyword to search. If the search is working correctly, on pressing submit, a new window will open and return the search results.

NOTE: Below the search results, you will see a tag cloud. You can click on a certain tag to see all links with the associated tag. You will NOT have the power to make any modifications to these tags or to include links to the tags.

Part 2: Adding links to the OER search.

NOTE: You will not have direct access to the UBC OER Search engine. If you want to add some sites that you think would be helpful, email Cindy Underhill (cindyund@exchange.ubc.ca) or Brian Lamb (brian.lamb@ubc.ca) to set up the method below to contribute to the search.

  1. Wiki Page
    1. Set up a UBC wiki page and include the URLs of all the sites you would like to include. Make sure the list of links are all hyperlinked correctly (if click, link should direct you to the page).
    2. Do NOT include very general links such as http://www.wikipedia.org/ because the search engine will include all pages whose address contains the entered URL. (i.e. if you enter a general URL such as http://www.wikipedia.org/ , the search engine will return results that may not necessarily be OER).
    3. Contact Cindy or Brian to get your wiki page added to the search engine. Once your page has been added, you may add or remove links from the wiki page and the links will be dynamically added to the search engine.
    4. Note that when editing links on the wiki page, the changes may not be applied to the search engine immediately (or even not for 4 or more hours). Wait at most 24 hours to see your changes. If after 24 hours you still do not see your modifications, notify Cindy or Brian.
  2. Google Collaboration
    1. In order to use Google Collaboration, you must have a Google account. If you don’t have one, you can register for one here.
    2. Once you have a Google account contact Cindy or Brian to request for an invitation to collaborate with the UBC OER Search.
    3. You will then receive an invite to collaborate via email. Accept the invitation and you will be able to contribute to the UBC OER Search.


Guide for managing and maintaining UBC OER Search

Instructions:

Part 1: Get familiar with Google Custom Search Engine.

  1. Google has a wonderful guide on how to use Google CSE and it would be a better guide than what I can come up with. Have a look at their guide: http://code.google.com/apis/customsearch/docs/start.html.
  2. You can also take a look at the two other guides, “Creating Google CSE” and “Integrating UBC OER Search,” for more details.

Part 2: Managing UBC OER Search Engine

There are two parts to the UBC OER Search, the search engine and the tag cloud. You must keep in mind that the tag cloud and the search engine are separate from each other. This means that adding or removing a link to the search engine will NOT mean that it will be added or removed from the tag cloud and vice versa.

  1. Search Engine
    1. The search engine is created using Google Custom Search Engine. The information of the Google account associated with the UBC OER Search can be acquired through Cindy Underhill
    2. To make any changes to the search engine you must login using the given information. If you want a site to be in the tag cloud as well, you must manually add it to the tag cloud by the method given below.
    3. If you find any broken link, remove from the search engine. Also you may notice non-OER pages appearing in the search results. You may have to change the engine to search the specific URL for a certain page.
  2. Tag Cloud
    1. The tag cloud is generated by using Delicious. If you don’t know what Delicious is, you can find more detail here: http://delicious.com/. The login for the delicious account can be found through Cindy Underhill
    2. NOTE: You must login via Yahoo and not by the Delicious login.
    3. To include a site to the tag cloud, add the site to Delicious and then tag the site with the appropriate tags.
    4. Be careful when choosing the tags for your links because we do not want a whole bunch of specific tags that would only fit one link (defeats the purpose of a tag cloud). Look through the already existing tags and choose a few that would be suitable for the site.
    5. Each site should have a minimum of 2 tags. If you can not find enough tags for a certain link, then create a new tag that would be general enough to fit a few different links. Currently, I am using the “resource” tag for sites that do not fit in any of the other tags. If you come up with a better tag feel free to change them.
    6. Do not go overboard when tagging sites. If you have 20 or 30 tags for a single link, you may want to remove some. Normally a site would be tagged by subject and the content they contain.

    Part 3: Adding additional links.

    1. The user of this search will not have direct access to the search engine. Currently we are uncertain of the people who would use this search (possibly faculty members or even other institutes). If the users want to include links that they think are relevant to the search, they must contact either Cindy or Brian.
    2. We have a few options to allow others to include sites to the search engine. Google CSE has a very useful tool that would allow other to add sites to the search. Go to the control panel of the UBC OER Search engine and on the left sidebar click on “Collaboration.”
    3. This will allow you to send invitation to other to work on the search engine (receiver of the invite must have a Google account). This method will grant the collaborator limited access. See Google’s guide for more details.
    4. The second method we have is to create a wiki page and include that wiki page to the search engine and dynamically extract all links on that wiki page.
    5. Using the wiki page will require moderation and maintenance to ensure that all links on the wiki pages are relevant and that they are correctly hyperlinked. Also currently, any links added to the wiki page will take a long time (4 or more hours) to cache and be implemented to the search.
    6. With the wiki page method, all non relevant page links (links on the left sidebar) will be included in the search. We can solve this problem by excluding all UBC wiki pages from the search engine, but this will also exclude any OER on UBC wiki pages.