lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Jon Schuster" <j...@attachmatewrq.com>
Subject RE: Lucene and remote index and java applet, with no java app server
Date Mon, 10 Oct 2005 19:24:33 GMT
The suggestion that others have made to make the search web based is
generally the preferred route.

But it is fairly straightforward to make an unsigned applet use a remote
Lucene index. You wouldn't need to write the index and PDF files to the
local disk; you only need to be able to open an input stream to the
server location where the index files are stored, which you can do using
URL.openStream. If the applet is unsigned, security restrictions would
require that the index files be under the applet's codebase, but it's
easy to determine the codebase URL. After the desired document is found
by the search, you can then use AppletContext.showDocument to open an
URL to the appropriate PDF file.

There are some gotchas if you use an applet, however. For one, the index
needs to be downloaded in order to search, and an index that's 1-2 MB
might take too long for a user to wait. Further, to avoid applet
security restrictions on reading and writing local files, you probably
need to use either a non-locking index or a RAM directory. Also, in
Lucene 1.4, there are a few classes that attempt to read system
properties, and these also run into applet security restrictions unless
the classes are modified (this last issue has been addressed in the next
release).

> Here's my dilemma.
> 
> For years, we have supplied paper documentation to our 
> customers.  Many
> pages of paper.  All together, it makes a 3 foot stack when printed.
> 
> Also for many years, customers have been asking for docs in electronic
> format, so, recently, I wrote some Perl scripts that convert our many
> legacy word perfect files into PDF format. (I shouldn't 
> really call them
> legacy, as that is still what the documentation author writes in.)
> 
> We generate some HTML pages as a wrapper, that break the 543 PDF files
> into different modules, and this gets placed on a section of 
> our web site.
> 
> The users can see the Module they want, and then grab an 
> appropriate PDF
> for that module, and view it in their browser.
> 
> Unfortunately, the names are things like MOD00_TBLS_FRMX.pgm.pdf,
> PGR254.S1.T33.pgm.pdf, etc. This is _somewhat_ transparent to we
> developers, but certainly doesn't make it easy for the end 
> users to find
> the appropriate section of documentation that they want
> 
> I would like to implement a search facility using Lucene, but I'm not
> sure of a few things.
> 
> Given that I can generate the index here, at the same time I 
> convert any
> changed WP files to PDF, and upload it to our web site, what then do I
> do with it.
> 
> I don't see, from my interrupted attempts at perusing the Lucene docs,
> any functions for a Java applet to access an index that is on a remote
> site.  We have no extra utilities available, such as a Java app server
> to run the search using RMI (I think I've read the Lucene 
> docs enough to
> use the buzzword correctly. :-> )
> 
> It seems that I am going to have to write an applet that will download
> the index (2M, 1M zipped) to a users local hard drive, then use that
> index to find the appropriate PDF file, then download the PDF 
> file, and
> start it in the users browser.
> 
> I'm assuming a signed applet, since as far as I can tell from my
> reading, an unsigned applet won't let any write, or reads, to 
> the local
> hard drive occur.
> 
> Does this sound feasible?
> 
> Would I be better off using Java app, and lava web start, to 
> download a
> jarred index, and take it from there?
> 
> I'm fishing for feasibility ideas right now, and any help will be
> greatly appreciated.
> 
> Dave @ TSC in Palm Harbor, FL
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org
> For additional commands, e-mail: java-user-help@lucene.apache.org
> 
> 

---------------------------------------------------------------------
To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org
For additional commands, e-mail: java-user-help@lucene.apache.org


Mime
View raw message