ColdFusion 9 and Solr – must schema.xml be edited?
Posted by David Faber on January 6, 2012
I’ve done a little bit of poking around, and the answer appears to be “yes”. There are dynamic fields defined in the default schema.xml file created by ColdFusion (<CF9_home>/collections/<collection_name>/conf/schema.xml
), but they are commented out! So even if you want to index a collection using only dynamic fields, you still have to edit schema.xml to uncomment the lines where the dynamic field wildcard matches are defined:
<!-- Dynamic field definitions. If a field name is not found, dynamicFields will be used if the name matches any of the patterns. RESTRICTION: the glob-like pattern in the name attribute must have a "*" only at the start or the end. EXAMPLE: name="*_i" will match any field ending in _i (like myid_i, z_i) Longer patterns will be matched first. if equal size patterns both match, the first appearing in the schema will be used. --> <!-- Dynamic Field for CF Category support <dynamicField name="category_*" type="string" indexed="true" stored="true" multiValued="true"/> --> <!-- <dynamicField name="*_i" type="sint" indexed="true" stored="true"/> <dynamicField name="*_s" type="string" indexed="true" stored="true"/> <dynamicField name="*_l" type="slong" indexed="true" stored="true"/> <dynamicField name="*_t" type="text" indexed="true" stored="true"/> <dynamicField name="*_b" type="boolean" indexed="true" stored="true"/> <dynamicField name="*_f" type="sfloat" indexed="true" stored="true"/> <dynamicField name="*_d" type="sdouble" indexed="true" stored="true"/> <dynamicField name="*_dt" type="date" indexed="true" stored="true"/> <dynamicField name="random*" type="random" /> -->
Leave a Comment