cancel
Showing results for 
Search instead for 
Did you mean: 

OpenSearch and Google

finner
Champ in-the-making
Champ in-the-making
Hi,
I'm currently looking at the search engine configuration and how to add remote repositories and I was wondering if it's possible to add Google, or Yahoo or any popular search engine into the mix on the OpenSearch list. The packaged example adds openTalk.
So I thought , what about Google then?

My web-api-config-custom.xml


  <!– register the proxy engine –>
            <engine label="Google"  proxy="google">

               <url type="application/rss+xml">
               </url>

               <url type="application/atom+xml">

               </url>

            </engine>


         <proxy>

        <!–  URL of Search Engine proxy –>

          <url>
http://localhost:8080/alfresco/service/search/engine/google/atom?as_q=alfresco
         </url>
         </proxy>



I've obviously misunderstood the documentation on this.
Is it possible to search on Google (or other search engines) as well ? Has anyone done it?

Thanks in advance
Finner
5 REPLIES 5

davidc
Star Contributor
Star Contributor
Almost there.

You can plug-in any url addressable search engine that returns atom or rss - html response is not supported.  Here are some examples:


            <engine label="Yahoo UK News" proxy="yahooUKNews">
               <url type="application/rss+xml">
                  http://uk.news.search.yahoo.com/news/rss?p={searchTerms}
               </url>
            </engine>
           
            <engine label="Yahoo Search" proxy="yahoo">
               <url type="application/rss+xml">
                  http://api.search.yahoo.com/WebSearchService/rss/webSearch.xml?appid=yahoosearchwebrss&query={search...?}
               </url>
            </engine>

            <engine label="Wikipedia Search" proxy="wikipedia">
               <url type="application/rss+xml">
                  http://api.search.yahoo.com/WebSearchService/rss/webSearch.xml?appid=yahoosearchwebrss&query={search...?}
               </url>
            </engine>
           
            <engine label="Yahoo Image Search" proxy="yahooImage">
               <url type="application/rss+xml">
                  http://api.search.yahoo.com/ImageSearchService/rss/imageSearch.xml?appid=yahoosearchwebrss&query={se...?}
               </url>
            </engine>

finner
Champ in-the-making
Champ in-the-making
David,
Cheers for that. The examples work great. I still can't display results from a Google News search though.


<engine label="Google News"  proxy="googleNews">
  <url type="application/rss+xml">
   http://news.google.com/news?q={searchTerms}&output=rss                 
   </url>
</engine>

I am getting a
Failed to retrieve search results …. HTTP response code 403..

Is there a standard method of finding out what the URL is for a particular site? For example, the openTalk URL search is

http://blogs.alfresco.com/opentalk/os-query?s={searchTerms}&itemstart={startIndex?}&itempage={startP...?}
How would I go about finding out what arguments are required for the URL ?
I realise that every site is different so my question is probably one of those "how long is a piece of string?" questions. Apologies if so and thanks again for your previous reply.

Finner

davidc
Star Contributor
Star Contributor
Look on the google site.  When you find out, let us know.

finner
Champ in-the-making
Champ in-the-making
Hi,
I had a look on the Google site but didn't get anything working. It looks like you need keys for permission using the Google API ……? I haven't had a chance to look into it further but if I find out anything I will certainly post it.

I found this if anyone is curious:

http://www.benhammersley.com/projects/google_to_rss.html


cheers
Finner

javauser007
Champ in-the-making
Champ in-the-making
hi Mike,
I configured the above code which u have mentioned in web-script-config-custom.xml (labs 3.0) and it is working fine in mozilla 3.0 and when i'm trying with IE 7.0 i'm getting this error "an error occured: Object required"
is there any limitation for this in IE?

for Google+opensearch,

Did anybody find the solutions for searching in google.
I'm spending a lot of time on this configuration and at the end came up with empty hands.
If anybody find this please post the code.
Thanks for your contribution.