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: Re: Lucene and remote index and java applet, with no java app server
Date Mon, 10 Oct 2005 20:46:42 GMT
Sorry about that, "download" was a poor word choice.

By download, I meant that after the applet opens an input stream to the
URL, it will need to read from the stream to get all the index data from
the web server to the user's machine so the applet can perform the
search. Whether the index files are downloaded and written to disk or
whether they're downloaded and cached in memory, it's still a bandwidth
consideration. As you mentioned earlier, the index files could live on
the server as zipped files, and the applet could unzip them on the fly.

Signing the applet would make things somewhat easier. But then you have
the potential problem of users who have been trained by their IT
departments (or have learned the hard way) to not accept any content
that requires specific permissions to run.


> Jon Schuster wrote:
> > 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).
> > 
> > 
> 
> I'm confused between paragraphs 2 and 3.
> 
> In 2, you say that I don't need the index on the local 
> machine, just an
> openStream to it.
> 
> In 3, you say that I need to download the index in order to search.
> 
> I have no problem signing the applet, if it will make this project
> feasible.  And downloading the index isn't that horrible either, as I
> can make it only happen once a day, not everytime they connect.
> 
> Thanks for the information.
> 
> Dave in Largo, FL
> 

---------------------------------------------------------------------
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