lucene-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Chris Hostetter <hossman_luc...@fucit.org>
Subject Re: Question about FieldInfos
Date Sun, 15 Jan 2006 08:59:27 GMT

: IMO, there's no reason to allow field definitions to be spec'd more
: often than once per IndexWriter.  Need to add a new field for docs
: 501-1000 of a 1000-doc indexing pass?  No problem: create a new
: IndexWriter, define new fields, and you're off and running.

If I understand your argument, you are saying that the list of fields and
their "flags" should be consistent in each segment -- and if someone wants
to add new fields they should open a new IndexWriter so they get a new
segment.

So what happens when segments get merged?

: Even that example seems esoteric to me.  Is it really necessary to be
: able to define new fields "at any time"?

Absafreakinglutely.  If you have an index that you modify constently by
adding (and deleteing/adding for replacing) documents and you want to add
a new field the current code base makes it easy: just start adding the
field to newly indexed/updated documents, and let them gradually get
updated.  When you reach the point where your query clients *must* have
the field, you forcably delete/re-add the documents that still don't have
a value.


At a more general level, I would cry very hard if a decission was made to
change the lucene code base such that the list of fields for all docs must
be specified at index construction.  I can think of at least once existing
lucene application that would be impossible to impliment if a single field
list had to be specified for every document in the index: "cnet.com"  :)

: : My radical suggestion:
: :
: :      * Require fields to be defined when the index
: :        is first created.

-1



-Hoss


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


Mime
View raw message