Q:

Solr Split string and storing into multiple fields while Indexing

Right now I have a field that is getting indexed in the below format,
“my_field”:”Abc&Deo&Efg”

There can be "n" number of items separated by "&", is there any way to split this field with & and store in separate field while Indexing in solr, field name can be the value itself in solr. 

A:

You will have to do this in the update chain.  Use a ScriptUpdateProcessor then write some Javascript to do this
<processor class="solr. StatelessScriptUpdateProcessorFactory">
    <str name="script">updateProcessor.js</str>
</processor>

In update Processor script (in your conf directory):
    function processAdd(cmd) {
        doc = cmd.solrDoc;  // org.apache.solr.common. SolrInputDocument
        field= doc.getFieldValue("my_field");

        // tokenize your string here on the & separate then put tokens into new field, which could be a multivalue
        doc.setField("mySplitField", token);
    }

The question is why you want to do this when you can simply tokenize on '&' when indexing then each component is searchable. 
Here is some more info: https://dutchweballiance.nl/techblog/introducing-the-solr-scriptupdateprocessor/

