Hi Hoss,

On 11/29/09 12:22 PM, "Chris Hostetter" <hossman_luc...@fucit.org> wrote:

> that would tell them if a field name is currently in use, but not what to
> do about it if it is already in use -- FieldType classes shouldn't need
> complicated hueristics to figure out somethign the user could configure.
> 

Maybe, but something needs that logic. Think relational database -- if you
try and add a field to a schema (e.g., using some DBMS client GUI or vanilla
command line SQL) where that name already exists, then you get a SQL
exception. Similarly, SOLR should support such concepts. Maybe it doesn't go
in FieldType (though I'm not convinced of that since I don't think it's as
complicated as is implied), but at the very least it should go into
IndexSchema.


> Even if the FieldType's where crazy smart -- it wouldn't provide any
> future-proofing.  a FieldType could inspect the schema and see that
> certain fieldnames aren't in use right now, but then i could change my
> schema and add a field name that *does* collide with something it
> previously picked, and now i'm screwed.

How are you screwed? If you add a field name that collides then as long as
the FieldType checked you'd still be OK? Maybe FieldTypes that support
multi-internal fields should have a requirement that they be configured from
the schema.xml file themselves, so that the user configuring the entire
schema can be made to deal with the namespacing at that level -- then if she
messes up the multi-field configuration, it's on them (with the help of SOLR
reporting a helpful exception and area in the schema where the collision
occurred)...

Cheers,
Chris


++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Chris Mattmann, Ph.D.
Senior Computer Scientist
NASA Jet Propulsion Laboratory Pasadena, CA 91109 USA
Office: 171-266B, Mailstop: 171-246
Email: chris.mattm...@jpl.nasa.gov
WWW:   http://sunset.usc.edu/~mattmann/
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Adjunct Assistant Professor, Computer Science Department
University of Southern California, Los Angeles, CA 90089 USA
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++



Reply via email to