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:
if(qName.equals("SPEECH")){
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,
Field.TermVector.YES);
lines.setBoost(1.0f);
doc.add(lines);
indexWriter.addDocument(doc);
}
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.
Sincerely;
Fayyaz
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:
http://www.nabble.com/Creating-an-index-from-an-XML-file-using-Lucene-in-Java-tp18678779p18682150.html
Sent from the Lucene - Java Users mailing list archive at Nabble.com.
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]