Hi,

I've been experimenting with Solr dynamic fields.  Here is what I've
gathered based on my research.

For instance, I have a setup where I am catching undefined custom fields
this way.  I am using (trie) types by the way.

        <dynamicField name="int*"  type="tint" indexed="true"  stored="true"
omitNorms="true" />
        <dynamicField name="date*"  type="tdate" indexed="true"
stored="true" omitNorms="true" />
        <dynamicField name="float*"  type="tfloat" indexed="true"
stored="true" omitNorms="true" />
        <dynamicField name="long*"  type="tfloat" indexed="true"
stored="true" omitNorms="true" />
        <dynamicField name="double*"  type="tfloat" indexed="true"
stored="true" omitNorms="true" />
        <dynamicField name="*"  type="text_general" indexed="true"
stored="true" omitNorms="true" />

I am dealing with documents that may have various number of custom fields.
Instead of having to deal with field type changes on Solr, I decided to go
with dynamic fields.  But what I realized is that over a period of time, I
could have int1, int2, int3 fields and they could be deleted in the database
and the Solr document has been deleted and re-added without the field values
for int1, int2 and int3.  I used the schema browser to inspect the fields
int1, int2 and int3, there's no docs associated with it but the field
definition remains.  I've tried unloading, reloading the cores and also
restarting the server but that doesn't remove the fields.  It only removes
when I clear everything out of the index using "*:*" query.

What type of penalty do I have to pay for having numerous unused fields?
Especially using (trie) fields.  I'm using it so that it'll work well with
range queries.

Thanks,

Zarni

Reply via email to