lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Erik Hatcher <e...@ehatchersolutions.com>
Subject Fwd: Search.jhtml ?
Date Sun, 31 Oct 2004 08:54:31 GMT


Begin forwarded message:

> From: Erik Hatcher <erik@ehatchersolutions.com>
> Date: October 31, 2004 3:53:39 AM EST
> To: <willydw@pandora.be>
> Subject: Re: Search.jhtml ?
>
> On Oct 30, 2004, at 9:07 AM, Willy De Waele wrote:
>> 	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 ?
>

That's just what makes the demo work.  Again, the demo application is 
merely that (and relatively weakly done, as you can tell).  Feel free 
to borrow parts of it or adapt it for other purposes than its basic 
purpose of showing how to index and search.

I have had strong intentions to improve the Lucene demo application.  
The Lucene book is now done (final typesetting corrections are now 
being made), and I've got a few more speaking commitments (Reston and 
Denver NFJS as well as ApacheCon).  I plan on taking a bit of a 
breather after that in November, and then in December I plan on ramping 
up my involvement with the Lucene community, and improving the demo 
application is going to be part of those efforts.

If you have improvements to contribute or suggest, send them our way!  
:)

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