lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Michael McCandless <luc...@mikemccandless.com>
Subject Re: Retrieving FieldInfo
Date Tue, 14 May 2013 17:35:31 GMT
On Tue, May 14, 2013 at 10:02 AM, Nicola Buso <nbuso@ebi.ac.uk> wrote:

> I now this can sound horrible/flexible/... but this mean I can add two
> documents with the same field name, but different configurations, for
> example different IndexOptions?

Yes and no :)

Lucene will happily index such drastically different fields, but then,
on merge, it will "merge" those two FieldInfos and pick the same
configuration for both.  For example if one of the fields omitsNorms
and the other did not, then on merge, they both will omit norms.
Other properties about the field, e.g. whether it was indexed or
whether/how term vectors were stored, are not merged/changed because
this is a per-document thing.

Lucene is often claimed to be "schema-less" but the truth is it
effectively has a secret schema that can change over time as merges
are done, if you index the same field name differently over time ...

Mike McCandless

http://blog.mikemccandless.com

---------------------------------------------------------------------
To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org
For additional commands, e-mail: java-user-help@lucene.apache.org


Mime
View raw message