lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Chris Hostetter <>
Subject Re: appendable filed problem
Date Sat, 29 Oct 2005 17:29:37 GMT

: I read that field are appendable (pag 33 of Lucene in Action), so it's easy
: just add each extracted text to the same index field "section".
: What it happens is not the expected result, as it's said in Lucene in
: Action, that is, Lucene doesn't internally appends all the texts together
: and index them in a single Field named "section". Or better, it does a
: mixture: if I use Luke to see the index, i saw a number of single fields
: called "section" each one with the corresponding text.

The wording choice may not be entirely clear ... the field values are not
"appended" in a java String/StringBuffer sense.  For the purposes of
*searching* the terms extracted from the field values are "appended" in
that the term position of the last term from the first value immediately
preceeds the term position of the first term from the second value.

(at least, i think that's how it workds)

as far as as the *stored* values of Fields, they are stored individually.
you can even have one Field with a field named "foo" that is not stored,
and another Field named "foo" that is stored -- both will be searchable,
but only the second will be returned.

: If i try to retrieve the section field with a simple query, it only returns
: me the first text contained in the first "section" field, instead of all the
: texts, as if they were indexed in the same field "section".

I'm guessing you are using Document.get(String), or
Document.getField(String) ... try using Document.getValues(String) or


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

View raw message