Joe Walsh
Joe Walsh

Reputation: 210

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?

Upvotes: 1

Views: 836

Answers (1)

Joe Walsh
Joe Walsh

Reputation: 210

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>

Upvotes: 3

Related Questions