It is generally much better to provide a link to your application than
a code snippet.  Code snippets can be drastically affected by the
context that they're in.

That said, here are some preliminary responses to your questions.

1. How  and where to add these parameters in the Ajax API
methodology ?
to the GSearchControl ? to the GWebSearch ?
I thought that I may use the SetSiteRestriction() definition but it
seems like this is not the solution for me.

>From your description, it's unclear to me if you're trying to utilize
CSE refinements (which are like sections within your CSE) or the
advanced search parameters.  In the case of the refinements, you need
to add those in the searcher.setSiteRestriction call.  Check out the
documentation, specifically the class reference, for details on how to
do this.  In the case of the latter, it's unfortunately going to be a
trial and error type thing.  The WebSearch.setRestriction method is
not well documented when it comes to what parameters it supports.  In
my own testing, just about nothing with as_ in front of it makes a
difference in the AJAX Search API.  For some of these, there might be
an equivalent that you can add to the query string itself, in which
case you could use searcher.setQueryAddition to add the appropriate
syntax.

2. How do I add multiple file types. For example, If I want to use
as_filetype for multiple file types (have tried to add "filetype:pdf
+OR
+filetype:doc" with no success )
Is there a way to define "Return WebPages updated in the…", meaning
date related search ?

Re: filetypes, It's for regular Google, but I would fully expect it to
work in the CSE (can't guarantee, though):  use
searcher.setQueryAddition('inurl:(pdf OR doc)'); to search for
particular file types.  Don't use plus signs ( + ) because those will
be encoded by the JS so that they will be different from spaces, which
is what you really want.  Unfortunately, there are no similar
additions that I know of for searching based on date.  You might
search the web, though; others have compiled much more comprehensive
lists of Google search operators than even Google tstelf maintains.

3. Where do I add the google analytics code ? (Please see example code
below - AddSelectedSearchers(myGsearchControl) )

When you signed up for Google Analytics, they should have given you
completely self-contained code to add it to your page.  Just plug it
in somewhere in the document head.  Beyond that, you'll want to look
for specific help on Analytics.

Jeremy R. Geerdes
Effective website design & development
Des Moines, IA

For more information or a project quote:
http://jgeerdes.home.mchsi.com
[EMAIL PROTECTED]

If you're in the Des Moines, IA, area, check out Debra Heights
Wesleyan Church!
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Google AJAX API" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/Google-AJAX-Search-API?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to