lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From syedfa <>
Subject Re: Creating an index from an XML file using Lucene in Java
Date Mon, 28 Jul 2008 00:01:22 GMT

I think I understand what you are saying, but I was hoping you could clarify
a little further.  in the start-element method, I have the following:

                        doc=new Document(); 

are you saying that I should add an identical block of code for
<SCENE-COMMENTARY> as well, and include a similar clause in the endElement
method as well? i.e.

                         else if(qName.equals("SCENE-COMMENTARY")){ 
                                Field lines = new Field(qName,
elementBuffer.toString(), Field.Store.YES, Field.Index.TOKENIZED,

Does it also matter where in the if/else if clauses I mention the
"SCENE-COMMENTARY" tag?  ie. should I mention it first?  last?  or does the
order matter?

Just wondering.
Thanks again for your prompt reply.

P.S.  This is actually a personal project, as I have developed an interest
in Information Retrieval and simply wanted to work on a creative project to
help me develop my skills.  :-) 

Karsten F. wrote:
> Hi Fayyaz,
> From my point of view, this is not a lucene question.
> If I understand your SAX-Handler correctly, you start a document with each
> "speech"-start-Tag and you end this document with each "lines"-close-Tag.
> So if you know that the SCENE-COMMENTARY Elements and the speech elements
> are disjunctive, you could use the same Element for generate document
> (start-tag) and adding document to index (close-tag).
> Best regards
>   Karsten
> p.s. is this a homework?

View this message in context:
Sent from the Lucene - Java Users mailing list archive at

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message