lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Riccardo Daviddi <rdavi...@gmail.com>
Subject Re: appendable filed problem
Date Sun, 30 Oct 2005 11:03:54 GMT
Ok, thank you for the clarification.

Cheers,

Riccardo

On 10/29/05, Chris Hostetter <hossman_lucene@fucit.org> wrote:
>
>
> : 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
> Document.getFields(String).
>
>
>
>
> -Hoss
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org
> For additional commands, e-mail: java-user-help@lucene.apache.org
>
>


--
Riccardo Daviddi
University of Siena - Information Engeneering
rdaviddi@gmail.com

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message