lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Iain Young <Iain.Yo...@microfocus.com>
Subject RE: Help with Searching indexes from a web app (Lucene 1.3 rc2)
Date Mon, 01 Dec 2003 16:21:04 GMT
Note, that I've just tried the example webapp supplied with Lucene, and I
appear to be having exactly the same problem with that. The 1.2 version
works ok, but the 1.3 version is displaying a path not found error.

Are there any known incompatibilities with certain versions of Tomcat (I'm
currently using version 4.0.3)

Thanks,
Iain

-----Original Message-----
From: Iain Young [mailto:Iain.Young@microfocus.com]
Sent: 01 December 2003 15:40
To: 'lucene-user@jakarta.apache.org'
Subject: Help with Searching indexes from a web app (Lucene 1.3 rc2)


> Hi folks.
> 
> I'm new to Lucene so this may be an obvious questions, but I am having
> problems with Lucene 1.3-rc2. I've got a bit of code which looks something
> like this....
> 
> public static void getSearchResults(String searchString, String indexDir)
> {
>     try
>     {
>         Searcher searcher = new IndexSearcher(indexDir);
>         .....
>         etc...
>         .....
>     }
>     catch (Exception ex)
>     {
>     }
> }
> 
> I'm calling it to from a web application (servlet) running in tomcat in
> conjunction with struts and velocity. If I use the Lucene 1.2 binary
> release, it all works fine and I get the search results ok. However, when
> I replace the 1.2 jar file with the 1.3-rc2 jat file,  (leaving all of my
> code exactly the same) it stops working, and I get a path not found
> exception being thrown. 
> 
> I've narrowed it down to the IndexReader.open(final Directory directory)
> method. Even if I pass a valid Directory object into this (created by
> FSDirectory), it just seems to throw the exception, (even though I know
> the directory object is not null etc). The bizarre thing is that this
> problem only seems to occur when I run it from the web application. If I
> invoke the same code from the command line, it works ok, (even though I'm
> using the same string for the index dir).
> 
> Anyone got any ideas? (I want to use 1.3 because I want to exploit some of
> the newer features). Does running from within a web application do
> something strange with the paths, even though the strings I'm using are
> fully qualified?
> 
> Thanks for your help,
> 
> Iain Young
> http://www.microfocus.com
> 

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


________________________________________________________________________
This e-mail has been scanned for viruses by MCI's Internet Managed Scanning
Services - powered by MessageLabs. For further information visit
http://www.mci.com
________________________________________________________________________

________________________________________________________________________
This e-mail has been scanned for viruses by MCI's Internet Managed Scanning
Services - powered by MessageLabs. For further information visit
http://www.mci.com
________________________________________________________________________

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


Mime
View raw message