lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Ulf Dittmer <>
Subject Re: Searching through a single XML document
Date Mon, 21 Apr 2008 05:38:16 GMT
The search can't return more than one document,
because only a single document is ever added to the
index. You might want to think about structuring the
index differently, e.g. by creating one Document for
each SPEECH element.

The search for "the" in particular won't find
anything, because that's a stopword that will be
removed if you use a StandardAnalyzer. (See the
comments about StopFilter in the StandardAnalyzer

You'll probably want to set the size of elementBuffer
to 0 after you created a Field that contains the
current text. Otherwise you'll be adding the same text
over and over again.

Also, think about using Field.Store.NO instead of
Field.Store.YES for the LINES. Unless you need to
retrieve the full text of each speech from the index,
this just makes the index very large for no good


Be a better friend, newshound, and 
know-it-all with Yahoo! Mobile.  Try it now.;_ylt=Ahu06i62sR8HDtDypao8Wcj9tAcJ

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

View raw message