You can configure dynamic fields in solr. In schema.xml in a block, <fields>you can configure dynamic field definitions as follows:
<fields>
...
<dynamicField name="*_t" type="text" indexed="true" stored="true" multiValued="false"/>
<dynamicField name="*_s" type="string" indexed="true" stored="true" multiValued="false"/>
<dynamicField name="*_sa" type="string" indexed="true" stored="true" multiValued="true" />
<dynamicField name="*_d" type="date" indexed="true" stored="true" multiValued="false"/>
<dynamicField name="*_f" type="sfloat" indexed="true" stored="true" multiValued="false"/>
<dynamicField name="*_i" type="sint" indexed="true" stored="true" multiValued="false"/>
<dynamicField name="*_ia" type="sint" indexed="true" stored="true" multiValued="true" />
</fields>
The specific settings you want may be different, but this is the main idea.
Consider the first definition dynamicFieldgiven above. This means that you can dynamically add any fields ending with _t, and these fields will be processed as text fields, will be indexed and saved and will be treated as a single value (unlike an array).
, , , . dynamicField , .
, . , , . , , , :
category_s = 'realty'
bedrooms_i = 4
:
category_s = 'shirts'
size_s = 'M'