lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Willy De Waele" <will...@pandora.be>
Subject RE: Search.jhtml ?
Date Sat, 30 Oct 2004 13:07:41 GMT

	Indeed, when I follow the procedure it is working fine ...
	I created an index with following statement:
		java org.apache.lucene.demo.IndexHTML -create
"E:/Java/lucene-1.4.2/docs"
		default index-dir: index
		all references absolute
	Why can't I search an index of files somewhere on the harddisk, in
other words why 
	should the 'docs' folder in de webapps/luceneweb folder ?

	Thnx
	Willy

-----Original Message-----
From: Erik Hatcher [mailto:erik@ehatchersolutions.com] 
Sent: vrijdag 29 oktober 2004 22:22
To: Lucene Users List
Subject: Re: Search.jhtml ?


On Oct 29, 2004, at 12:12 PM, Willy De Waele wrote:
>
> 	First at all, thanks for you answer.
> 	Now I get some results with the jsp's, but the url's in de result is

> not clickeable ...
> 	Is this normal? (should I modify the template?)

It's a known issue that the Lucene web demo is quite shabby.

I created detailed instructions for running it as an appendix to Lucene 
in Action.  I'm pasting the relevant sections below:


Running the web application demo The web demo is slightly involved to 
set up and run properly.
You need a web container; our instructions are for Tomcat 5.  The 
docs/demo.html documentation provides detailed instructions for setting 
up and running the web application, but you can also follow the steps 
provided here.  The index used by the web application differs slightly 
from that in the command-line demo. First, it restricts itself to 
indexing only .html, .htm, and .txt files. Each file it processes 
(including .txt files) is parsed using a custom rudimentary HTML 
parser. To build the index initially, execute IndexHTML:

java -cp lucene-1.4.2.jar;lucene-demos-1.4.2.jar    
org.apache.lucene.demo.IndexHTML -create -index webindex docs

...
adding docs/resources.html
adding docs/systemproperties.html
adding docs/whoweare.html
Optimizing index... 7220 total milliseconds

The -index webindex switch sets the location of the index directory. In 
a moment, you’ll need the full path to this directory to configure the 
web application. The final docs argument to IndexHTML is the directory 
tree to index. The –create switch creates an index from scratch. Remove 
this switch to update the index with files that have been added or 
changed since the last time the index was built.  Next, deploy 
luceneweb.war (from the root directory of the extracted distribution) 
into CATALINA_HOME/webapps. Start Tomcat, wait for the container to 
complete the startup routine, and then edit 
CATALINA_HOME/webapps/luceneweb/configuration.jsp using a text editor 
(Tomcat should have expanded the .war file into a luceneweb directory 
automatically). Change the value of indexLocation appropriately, as in 
this example, specifying the absolute path to the index you built with 
IndexHTML:

String indexLocation =       
"/dev/LuceneInAction/install/lucene-1.4.1/webindex";

Now you’re ready to try the web application. Visit 
http://localhost:8080/luceneweb in your web browser, and you should see 
“Welcome to the Lucene Template application...” (you can also change 
the header and footer text in configuration.jsp). If all is well with 
your configuration, searching for Lucene-specific words such as 
"QueryParser AND Analyzer" should list valid results based on Lucene’s 
documentation.  You may try to click on one of the search results links 
and receive an error. IndexHTML indexes a url field, which in this case 
is a relative path of docs/.... To make the result links work properly, 
copy the docs directory from the Lucene distribution to 
CATALINA_HOME/webapps/luceneweb.   Yes, these steps are a bit more 
manual than they should be. Rest assured that improvements to Lucene’s 
example applications are on our to-do list as soon as we’re finished 
writing this book!

(sorry about the formatting of the above - it was pasted straight from 
a PDF)

	Erik


>
> 	TIA & Regards
> 	Willy
>
> -----Original Message-----
> From: Daniel Naber [mailto:daniel.naber@t-online.de]
> Sent: donderdag 28 oktober 2004 20:21
> To: Lucene Users List
> Subject: Re: Search.jhtml ?
>
>
> On Thursday 28 October 2004 15:01, Willy De Waele wrote:
>
>>         Executing the demos as a bat file (Windows) is working fine, 
>> but using lucene as a web 'application' is not working ...
>
> I think that Search.jhtml is totally outdated, please try src/jsp
> instead.
>
> Regards
>  Daniel
>
> --
> http://www.danielnaber.de
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: lucene-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: lucene-user-help@jakarta.apache.org




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