Chris Pollett > Students >
Priya

    ( Print View )

    [Bio]

    [Project Blog]

    [CS297 Proposal]

    [Deliverable 1]

    [Deliverable 2]

    [Deliverable 3]

    [Deliverable 4]

    [CS297 Report - PDF]

    [CS298 Proposal]

    [CS298 Progress Report]

    [CS298 Report - PDF]

    [CS298 Presentation - PDF]

                          

























Deliverable 4 - Custom Search Engine Wrapper for image based search

Goal

The main objective of this deliverable is to put an Google Image Search box in a web page and search for images dynamically.

Introduction

Google AJAX search APIs allow for Google search in web pages with JavaScript. A dynamic search box can be embedded into the web pages and display the results in the same web page.

Implementation Details

Figure 1 below shows a web page consisting of a description of the recipe, "Mashed Potatoes". The ingredients are listed followed by directions. An image search box is provided on the right side of the page. The results of the search are displayed right below the box. One ingredient of the recipe,russet potatoes is hyperlinked.

Recipe Description Page
Figure 1: Recipe Description Page

When the user clicks on the hyperlinked ingredient, images of the ingredient are displayed below the search box with the ingredient as the search phrase. Figure 2 below shows the case when the user clicks on the russet potatoes. Images of potatoes are shown below the search box.

Image results after the ingredient is clicked
Figure 2: Image results after the ingredient is clicked

Google Ajax Search APIs also provides the facility to restrict the sites from which the data needs to be retrieved.

Source code

Source code [.zip file]