I have a scenario where I would like to dynamically assign incoming document fields to two different solr schema fieldTypes. One fieldType will be an 'exact match' fieldType while the other will be a 'full text' fieldType. The fields will follow a predictable pattern but the pattern can not be recognized using the dynamicField type and will not be known ahead of time.
So here is an example of the field names that I need to be able to process:
FOO_BAR_TEXT_1
FOO_BAR_TEXT_2
WIDGET_BAR_TEXT_3
WIDGET_BAR_TEXT_4
--
FOO_BAR_SELECT_1
FOO_BAR_SELECT_2
WIDGET_BAR_SELECT_1
The above fields will not be defined in advance. I need to map all fields with the name _BAR_SELECT_ to a fieldType of 'exactMatch' and I need to map all of the fields with name _BAR_TEXT_ to a fieldType of 'fulltext'. I was hoping there might be a way of doing this dynamically when the document is indexed.