lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Otis Gospodnetic <otis_gospodne...@yahoo.com>
Subject Re: How extract a Field.Text(String, String) field to process it with a Stylesheet?
Date Fri, 15 Oct 2004 11:29:01 GMT
That's likely because you used an Analyzer that stripped the XML (<, >,
etc.) from the original text.  If you want to preserve the original
text, use an Analyzer that doesn't throw your XML away.  You can write
your own Analyzer that doesn't discard anything, for instance.

Otis


--- "Juan A. Polanco" <pol462@hotmail.com> wrote:

> I have used the Lucene factory method Field.Text(String, String) to
> index, 
> tokenize and store several hundreds short xml files. I stored the
> entire xml 
> content of these files in a field called "content".
> Now I want to use the Lucene search results with Cocoon.
> 
> For this I'm using a XSP with the following code extract:
> 
> <![CDATA[
> for(int i = 0; i < hits.length(); i++)
> {]]
>    <xsp:content>
>       <xsp:expr>hits.doc(i).get("content")</xsp:expr>
>    </xsp:content>
> <![CDATA[
> }
> searcher.close();
> 
> This code works as much as it extracts the xml files safed in the
> Lucene 
> "content" field. The problem is  that the contents appear as normal
> text 
> instead of xml to which I could apply a stylesheet.
> 
> Thanks for any help.
> Juan
> 
> _________________________________________________________________
> FREE pop-up blocking with the new MSN Toolbar  get it now! 
> http://toolbar.msn.click-url.com/go/onm00200415ave/direct/01/
> 
> 
> ---------------------------------------------------------------------
> 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