OK, I'm fine w/ taking this type of approach, as opposed to the lookup mechanism I have. Of the two laid out below, there are pros and cons to both, as I see it.
I'm inclined towards Option B. This keeps it "hidden" from the user, but doesn't require extra work for Solr. Let me code it up. On Dec 9, 2009, at 4:12 PM, Yonik Seeley 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