I am assuming you are using the Sitecore configuration for your custom index (in which case you should also use the api, but let's skip that discussion).
Note that I never tried what I'm explaining here, but it might get you in the right direction.. in the DefaultIndexConfiguration for Solr (defaultSolrIndexConfiguration
located in Sitecore.ContentSearch.Solr.DefaultIndexConfiguration.config) you can find the typeMatches
in the fieldMap
. These typeMatches define the fieldNameFormat
. For a string it mentions
<typeMatch typeName="string" type="System.String" fieldNameFormat="{0}_s" settingType="Sitecore.ContentSearch.SolrProvider.SolrSearchFieldConfiguration, Sitecore.ContentSearch.SolrProvider" />
Note the "{0}_s".
First if all, create your own version of the configuration (patch it) and attach that to your index. Then you can start making adjustments..
You might change the fieldNameFormat for the string type, but that will change the value for all string fields. Another option is to create a new type and map your field to that type (in the fieldNames
section).
This seems logical, but again: I didn't try this myself..