You can define new custom fields in solr by adding them to schema.xml in the <fields> element:
<fields> ... <field name="newfieldname" type="text_general" indexed="true" stored="true" multiValued="true"/> ... </fields>
For an overview of supported types (used to define <fieldType> in Solr, which is then used to define field elements), look at this link: https://cwiki.apache.org/confluence/display/solr/Field+Types+Included + with + Solr . For example, type "text_general" is defined in schema.xml as:
<fieldType name="text_general" class="solr.TextField" positionIncrementGap="100"> <analyzer type="index"> <tokenizer class="solr.StandardTokenizerFactory"/> <filter class="solr.StopFilterFactory" ignoreCase="true" words="stopwords.txt" enablePositionIncrements="true" /> <filter class="solr.LowerCaseFilterFactory"/> </analyzer> <analyzer type="query"> <tokenizer class="solr.StandardTokenizerFactory"/> <filter class="solr.StopFilterFactory" ignoreCase="true" words="stopwords.txt" enablePositionIncrements="true" /> <filter class="solr.SynonymFilterFactory" synonyms="synonyms.txt" ignoreCase="true" expand="true"/> <filter class="solr.LowerCaseFilterFactory"/> </analyzer> </fieldType>
You can see that class="solr.TextField" used as the main field type. There are already several types defined by default in the Solr schema ... but you can define more, not sure if you can define the ones you request.
source share