Hi Yonik et al.,

I¹d like to add:

Option C: Sub fields are specified as a attribute on the fieldType tag
============================================================================
// needed to essentially define the point type
 <fieldType name="latlon" class="GeoPoint" subFieldSuffix="_latlon" ../>

// uses of the latlon type
 <field name="home" type="latlon" indexed="true" stored="false"/>

// subFieldSuffix is appended to the subFields indexed and thus those would
be:

home_latlon_0
home_latlon_1

I like elements of Option B that you present below, however it seems to be
mixing concerns. Type inheritance (aka your "subFieldType" attribute) seems
to be orthogonal to poly fields -- a good idea, but another issue IMHO.

Cheers,
Chris

On 12/9/09 1:12 PM, "Yonik Seeley" <yo...@lucidimagination.com> wrote:

> Proposal for handling points using only the field lookup mechanisms
> currently in place in IndexSchema:
> 
> Option A: dynamic fields used for subfields, those dynamic fields need
> to be explicitly defined in the XML
> ============================================================================
> // needed to essentially define the point type
> <fieldType name="latlon" class="TrieDoubleFIeld" precisionStep="8"/>
> <fieldType name="point" subFieldSuffix="_latlon" .../>
> <dynamicField name="*_latlon" type="latlon" indexed="true" stored="false"/>
> 
> // uses of the point type
> <field name="home" type="point"/>
> <dynamicField name="*_point" type="point"/>
> 
> // subFieldSuffix is appended to the subFields indexed and thus those would be
> home__0_latlon
> home__1_latlon
> 
> // And the indexed fields for dynamic field work_point would be
> work_point__0_latlon
> work_point__1_latlon
> 
> // NOTE: this scheme works fine for subFields with different fieldTypes
> 
> Option B: dynamic fields used for subfields, dynamic fields inserted
> into schema automatically
> ====================================================================
> // needed to essentially define the point type
> <fieldType name="latlon" class="TrieDoubleFIeld" precisionStep="8"/>
> <fieldType name="point" subFieldType="latlon"/>
> 
> // uses of the point type
> <field name="home" type="point"/>
> <dynamicField name="*_point" type="point"/>
> 
> // A dynamic field is inserted into the schema by the point class of
> the form __<subFieldTypeName> by default.
> // This could be changed via an optional subFieldSuffix param on the
> point fieldType.  double underscore used
> // to minimize collisions with user-defined dynamic fields.
> home_0__latlon
> home_1__latlon
> 
> // And the indexed fields for dynamic field work_point would be
> work_point__0__latlon
> work_point__1__latlon
> 
> // NOTE: this scheme works fine for subFields with different fieldTypes
> 
> 
> -Yonik
> http://www.lucidimagination.com
> 


++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
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