RE: highlighting with Lucene

2003-02-10 Thread Hugo Burm
Hi,

The steps you describe below are correct. But it may not be as easy as you
may wish.

Some points:
- The Cocooncenter article was written before Lucene support was integrated
in Cocoon.
Because of this:
- I did not use the indexer integrated in Cocoon, but used my own classes to
index xml files.
- I used my own xsp-logicsheet to pass the query to Lucene and get the
results back.
(you can download the classes and xsp sheet from the Cocooncenter site)

- The highlight transformer has to know about the terms of the query. If I
remember correctly, my xsp page creates a  tag out of the request,
and passes that to the transformer.

So the answer to your question: if you follow the article step by step, it
may work. If you want to mix with Lucene functionality integrated in Cocoon,
it will not.

Off course this is a bad thing. It should work as you describe below. So I
have to change this Tranformer in order to make it fit better in the current
Cocoon/Lucene environment. And meanwhile hope that the modifications of Maik
Schreiber are incorporated into the current branch of Lucene, so you could
skip recompiling Lucene

Hugo

-Original Message-
From: Cyril Vidal [mailto:[EMAIL PROTECTED]]
Sent: Monday, February 10, 2003 1:21 PM
To: [EMAIL PROTECTED]; [EMAIL PROTECTED]
Subject: highlighting with Lucene


Hi,

 I have a question about using highlighting with Lucene.
What I only want to do:
start from an xml document, by example:

This is a beautiful yellow flower


that I have first indexed in Lucene's index.

 And when making a query such : flower:yellow
get an XML document from the following form:


This is a beautiful yellow flower


I don't want ANYsearch function, but just gain benefit from the highlight
function in Lucene.

At first glance, I think it's quite a easy task:
1°) Download the java classes from Maik Screiber, make the few modifications
on Lucene's code.
2°) Compile the Highlight Transformer java class from article
www.cocooncenter.org
3°) Write my sitemap, as written in the same article:







  

And when pointing to the url:
http://localhost:8080/cocoon/flora?query=flower:yellow

I should have the desired document:

This is a beautiful yellow flower


Is this right, or highlighting is a much more difficult task?

Thanks for your response,
Cyril.




-
Please check that your question  has not already been answered in the
FAQ before posting. <http://xml.apache.org/cocoon/faq/index.html>

To unsubscribe, e-mail: <[EMAIL PROTECTED]>
For additional commands, e-mail:   <[EMAIL PROTECTED]>



-
Please check that your question  has not already been answered in the
FAQ before posting. <http://xml.apache.org/cocoon/faq/index.html>

To unsubscribe, e-mail: <[EMAIL PROTECTED]>
For additional commands, e-mail:   <[EMAIL PROTECTED]>




highlighting with Lucene

2003-02-10 Thread Cyril Vidal
Hi,

 I have a question about using highlighting with Lucene.
What I only want to do:
start from an xml document, by example:

This is a beautiful yellow flower


that I have first indexed in Lucene's index.

 And when making a query such : flower:yellow
get an XML document from the following form:


This is a beautiful yellow flower


I don't want ANYsearch function, but just gain benefit from the highlight
function in Lucene.

At first glance, I think it's quite a easy task:
1°) Download the java classes from Maik Screiber, make the few modifications
on Lucene's code.
2°) Compile the Highlight Transformer java class from article
www.cocooncenter.org
3°) Write my sitemap, as written in the same article:







  

And when pointing to the url:
http://localhost:8080/cocoon/flora?query=flower:yellow

I should have the desired document:

This is a beautiful yellow flower


Is this right, or highlighting is a much more difficult task?

Thanks for your response,
Cyril.




-
Please check that your question  has not already been answered in the
FAQ before posting. <http://xml.apache.org/cocoon/faq/index.html>

To unsubscribe, e-mail: <[EMAIL PROTECTED]>
For additional commands, e-mail:   <[EMAIL PROTECTED]>