lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jeff French <j...@mdbconsulting.com>
Subject Re: Nested Fields
Date Fri, 10 Aug 2007 04:37:29 GMT

Spencer, it seems inefficient to me too, but that's pretty much what I did
for tables embedded within a document. 

I used a SAX parser to parse the document and kept track of the table
elements I saw. When I received an endElement, I added the text I had
buffered up in the characters() method to the buffer for each parent
element. Then I removed the current element and added its content as a
Field.

I should add that I am also fairly new to Lucene, so just because I did it
that way doesn't mean it's the best or even a good way.

    Jeff


Spencer Tickner wrote:
> 
> I'm fairly new to lucene so excuse the ignorance. I'm attempting to
> field an XML documents with nested fields. So:
> 
> <foo>
>   <bar>This</bar>
>   <bat>That</bat>
> </foo>
> 
> ...
> 
> The only way I can see a way of doing this now is to field each
> element I want to field and all of it's descendant text, ...
> 

-- 
View this message in context: http://www.nabble.com/Nested-Fields-tf4214959.html#a12085200
Sent from the Lucene - Java Users mailing list archive at Nabble.com.


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


Mime
View raw message