Win a copy of Functional Reactive Programming this week in the Other Languages forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

how can i use google api in my intranet application

 
saikrishna cinux
Ranch Hand
Posts: 689
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
i found google api in google site
here is the link http://www.google.com/apis/download.html
and now i want to use it in my java application to utilize the searching technique provided by java

ther are many sites which provides this functionalities for example here is one site
you can see here by typing a query in google text filed it gives the results of same website.
can i do it wiht this google api ?
how can i do it?
please can any one explaine me about this

sorry moderators if i am posting at the wrong place.
thanks
 
Ernest Friedman-Hill
author and iconoclast
Marshal
Pie
Posts: 24212
35
Chrome Eclipse IDE Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You can't do it for your Intranet application because, presumably, it's behind a firewall and Google isn't indexing it. The Google API can only be used to find data that Google is indexing. There are also terms of service which prohibit (I believe) commercial use without a license, although I could be wrong about that.

The kind of thing you describe has nothing to do with the Google API, however; it's just a link to Google using the appropriate form inputs for their "Advanced search" function. Go to JavaRanch's "Search" page and use "View Page Source" to see how it's done here..

Of course, this won't work for your Intranet site, either. Google will sell you a "search appliance" -- a machine you can put on your Intranet that will index everything and make it locally searchable. Otherwise, there are a number of open-source Web-search and text-search packages you might use.
 
saikrishna cinux
Ranch Hand
Posts: 689
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Originally posted by Ernest Friedman-Hill:

The kind of thing you describe has nothing to do with the Google API, however; it's just a link to Google using the appropriate form inputs for their "Advanced search" function. Go to JavaRanch's "Search" page and use "View Page Source" to see how it's done here..

Of course, this won't work for your Intranet site, either. Google will sell you a "search appliance" -- a machine you can put on your Intranet that will index everything and make it locally searchable. Otherwise, there are a number of open-source Web-search and text-search packages you might use.



well, thanks for your valuable suggestion!!!
great explanation

hmmmm,yes i have seen the technique of google advanced search usage in javaranch site is fine

but you are saying that i may not use this (not helpful for me)
i dont want to buy google appliances for this intranet search i would like to have some free stuff for searching intranet
so i would like to request you to provide me some links for free intranet searching logic

thanking you sir

regards
saikrishna
 
saikrishna cinux
Ranch Hand
Posts: 689
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
please sombody give some resources for intranet searching
 
Paul Sturrock
Bartender
Posts: 10336
Eclipse IDE Hibernate Java
 
Ulf Dittmer
Rancher
Posts: 42968
73
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
... and based on Lucene, Nutch.
 
saikrishna cinux
Ranch Hand
Posts: 689
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Originally posted by Paul Sturrock:
Lucene



I have downloaded this free application and deployed at tomcat4.0 and when i enter something in search field and press search button it has given an exception

the exception report is here

type Exception report

message Internal Server Error

description The server encountered an internal error (Internal Server Error) that prevented it from fulfilling this request.

exception

org.apache.jasper.JasperException: Unable to compile class for JSPNote: sun.tools.javac.Main has been deprecated.


An error occured between lines: 60 and 87 in the jsp file: /results.jsp

Generated servlet error:
D:\Tomcat4\work\localhost\luceneweb\results$jsp.java:205: Wrong number of arguments in method.
query = QueryParser.parse(queryString, "contents", analyzer); //parse the
^


An error occured between lines: 60 and 87 in the jsp file: /results.jsp

Generated servlet error:
D:\Tomcat4\work\localhost\luceneweb\results$jsp.java:206: Exception org.apache.lucene.queryParser.ParseException is never thrown in the body of the corresponding try statement.
} catch (ParseException e) { //query and construct the Query
^
Note: D:\Tomcat4\work\localhost\luceneweb\results$jsp.java uses or overrides a deprecated API. Recompile with "-deprecation" for details.
2 errors, 2 warnings

at org.apache.jasper.compiler.Compiler.compile(Compiler.java:284)
at org.apache.jasper.servlet.JspServlet.loadJSP(JspServlet.java:546)
at org.apache.jasper.servlet.JspServlet$JspServletWrapper.loadIfNecessary(JspServlet.java:177)
at org.apache.jasper.servlet.JspServlet$JspServletWrapper.service(JspServlet.java:189)
at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:382)
at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:474)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:247)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:193)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:243)
at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:566)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472)
at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:201)
at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:566)
at org.apache.catalina.valves.CertificatesValve.invoke(CertificatesValve.java:246)
at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:564)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472)
at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)
at org.apache.catalina.core.StandardContext.invoke(StandardContext.java:2344)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:164)
at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:566)
at org.apache.catalina.valves.ErrorDispatcherValve.invoke(ErrorDispatcherValve.java:170)
at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:564)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:170)
at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:564)
at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:462)
at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:564)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472)
at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:163)
at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:566)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472)
at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)
at org.apache.catalina.connector.http.HttpProcessor.process(HttpProcessor.java:1011)
at org.apache.catalina.connector.http.HttpProcessor.run(HttpProcessor.java:1106)
at java.lang.Thread.run(Thread.java:534)




i havn't changes any code but it is displaying this exception i think theseer might be problem with the development side



if you dont mind will you provide me working application
 
saikrishna cinux
Ranch Hand
Posts: 689
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
after this i have donwloaded older version it is working fine
but i dont know about this index
it is taking giving the output message something like this

Welcome to the Lucene Template application. (This is the header)

ERROR opening the Index - contact sysadmin!

Error message: D:\opt\lucene\index not a directory


Apache Lucene Template WebApp 1.0


what is this error messgae

should i need to provide the index ?

any suggestions???
 
Paul Sturrock
Bartender
Posts: 10336
Eclipse IDE Hibernate Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

should i need to provide the index ?

Of course. Lucene is an application that produces searchable indices of documents. You will have to create an index in order to search anything.

I suggest you read the Lucene documentation before trying to do any more work with it.
[ October 25, 2006: Message edited by: Paul Sturrock ]
 
saikrishna cinux
Ranch Hand
Posts: 689
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Originally posted by Paul Sturrock:

Of course. Lucene is an application that produces searchable indices of documents. You will have to create an index in order to search anything.

I suggest you read the Lucene documentation before trying to do any more work with it.

[ October 25, 2006: Message edited by: Paul Sturrock ]



yes, i have gone thru documentation provided by apache but the documentation was not so good so now i am asking here for help

how can i create an index file ?
can you provide me any example index file for searching?


thanks a lot
 
Paul Sturrock
Bartender
Posts: 10336
Eclipse IDE Hibernate Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

how can i create an index file ?

As per the documentation. If something goes wrong with that, post a description here and someone may help.
[ October 27, 2006: Message edited by: Paul Sturrock ]
 
Ernest Friedman-Hill
author and iconoclast
Marshal
Pie
Posts: 24212
35
Chrome Eclipse IDE Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Well, not here, as in "not in this forum." Now that this is question-and-answer about Lucene, I'm moving it to "Other Open Source Projects".
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic