The best way to include an exact phrase is with quotation marks. I.e.,
"\"make sure you add this to the result section\"" However, the API is
rather finicky with that stuff, and will often return a significantly
reduced resultset or no no resultset at all.

jg

On Tue, Jan 8, 2013 at 12:41 PM, Asad Ullah <[email protected]> wrote:

> I am using following code to search with Google's API. The following code
> works well. But I would like to include following thins as well:
>
>    1. How can I make search for exact words?
>    2. How can I evaluate in codes that, my words have been found or not?
>
> The search should only show the exact word search results, if found.
>
> function OnLoad() {
>     // Create a search control
>     var searchControl = new google.search.SearchControl();
>
>     // Add in a full set of searchers
>     searchControl.addSearcher(new google.search.WebSearch());
>
>     // tell the searcher to draw itself and tell it where to attach
>     searchControl.draw(document.getElementById("searchcontrol"));
>
>     // execute an inital search
>     searchControl.execute("make+sure+you+add+this+to+the+result+section");}
> google.setOnLoadCallback(OnLoad);
>
>  --
> You received this message because you are subscribed to the Google
> Groups "Google AJAX APIs" group.
> To post to this group, send email to
> [email protected]
> To unsubscribe from this group, send email to
> [email protected]
> To view this message on the web, visit
> https://groups.google.com/d/msg/google-ajax-search-api/-/-yM9820ufgsJ
> For more options, visit this group at
> http://groups.google.com/group/google-ajax-search-api?hl=en?hl=en
>



-- 
Jeremy R. Geerdes
Generally Cool Guy
Des Moines, IA

If you're in the Des Moines, IA, area, check out Debra Heights Wesleyan
Church!
http://www.debraheightswesleyan.org

-- 
You received this message because you are subscribed to the Google
Groups "Google AJAX APIs" group.
To post to this group, send email to
[email protected]
To unsubscribe from this group, send email to
[email protected]
To view this message on the web, visit
http://groups.google.com/group/google-ajax-search-api?hl=en_US
For more options, visit this group at
http://groups.google.com/group/google-ajax-search-api?hl=en?hl=en

Reply via email to