solrschemaless

Is it possible to include special characters in a field name with Solr in schemaless mode?


I want my dynamic field names to be able to include hash characters. Is this possible when Solr is in schemaless mode?


Solution

  • Found it. In the file solrconfig.xml I changed the following block of code

    <processor class="solr.FieldNameMutatingUpdateProcessorFactory">
        <str name="pattern">[^\w-\.]</str>
        <str name="replacement">_</str>
     </processor>
    

    to

    <processor class="solr.FieldNameMutatingUpdateProcessorFactory">
        <str name="pattern">[^\w-\.\#]</str>
       <str name="replacement">_</str>
     </processor>