Lowercase filter factory doesn't work when docvalues=true
<p>I am trying to achieve case insensitive sorting using Solr and faced <a href="https://stackoverflow.com/questions/31745713/solr-case-insensitive-sort-not-working">this issue</a>. </p>

<p>[Copied]</p>

<pre><code>....But When I get search result its not sorted case insensitive. It gives all camel case result first and then all lower case

If I m having short names

Banu

Ajay

anil

sudhir

Nilesh

It sorts like Ajay, Banu, Nilesh, anil, sudhir
...................
</code></pre>

<p>I followed <a href="https://stackoverflow.com/a/31746001/2098335">the solution</a> and made the following changes in my solr schema.xml file (only relevent field and field type is shown):</p>

<p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="false">
<div class="snippet-code">
<pre class="snippet-code-html lang-html prettyprint-override"><code>&lt;?xml version="1.0" encoding="UTF-8" standalone="no"?&gt;
&lt;schema name="autoSolrSchema" version="1.5"&gt;
 &lt;types&gt;
  ...............
  &lt;fieldType class="org.apache.solr.schema.TextField" name="TextField"&gt;
   &lt;analyzer&gt;
    &lt;tokenizer class="solr.KeywordTokenizerFactory"/&gt;
    &lt;filter class="solr.LowerCaseFilterFactory"/&gt;
   &lt;/analyzer&gt;
  &lt;/fieldType&gt;
  .............
 &lt;/types&gt;
 &lt;fields&gt;
 .................
  &lt;field indexed="true" multiValued="false" name="name" stored="true" type="TextField" docValues="true" /&gt;
 ................ 
 &lt;/fields&gt;
 &lt;uniqueKey&gt;id&lt;/uniqueKey&gt;
 &lt;/schema&gt;</code></pre>
</div>
</div>
</p>

<p>But that didn't solve the sorting issue. So I <strong>removed</strong> <code>docValues="true"</code> from the field definition and tried again. This time sorting worked fine, but I had to specify <code>useFieldCache=true</code> in the query. </p>

<p>Why <code>solr.LowerCaseFilterFactory</code> is not working with <code>docValues="true"</code>? </p>

<p>Is there any other ways to make case insensitive sorting to work without removing <code>docValues="true"</code> and specifying <code>useFieldCache=true</code>? </p>

<p><strong>Update:</strong></p>

<p>I  followed ericLavault's advice and implemented Update Request processor. But now I am facing the following issues:</p>

<p><strong>1)</strong> We are using dse search. So followed the method specified in <a href="http://docs.datastax.com/en/datastax_enterprise/4.0/datastax_enterprise/srch/srchUpdatReqProc.html" rel="nofollow noreferrer">this article.</a></p>

<p>Our current table schema:</p>

<pre><code>CREATE TABLE IF NOT EXISTS test_data(
    id      UUID,   
    nm      TEXT,   
    PRIMARY KEY (id)
</code></pre>

<p>Solr schema :</p>

<p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="false">
<div class="snippet-code">
<pre class="snippet-code-html lang-html prettyprint-override"><code> Solr schema :

&lt;?xml version="1.0" encoding="UTF-8" standalone="no"?&gt;
&lt;schema name="autoSolrSchema" version="1.5"&gt;
 &lt;types&gt;
  &lt;fieldType class="org.apache.solr.schema.UUIDField" name="UUIDField"/&gt;
  &lt;fieldType class="org.apache.solr.schema.StrField" name="StrField"/&gt;
 &lt;/types&gt;
 &lt;fields&gt;
  &lt;field indexed="true" multiValued="false" name="nm" stored="true" type="StrField" docValues="true"/&gt;
  &lt;field indexed="true" multiValued="false" name="id" stored="true" type="UUIDField"/&gt;
  &lt;field indexed="true" multiValued="false" name="nm_s" stored="true" type="StrField" docValues="true"/&gt;
 &lt;/fields&gt;
 &lt;uniqueKey&gt;id&lt;/uniqueKey&gt;
&lt;/schema&gt;</code></pre>
</div>
</div>
</p>

<p>As advised , I converted nm to lowecase and inserted as nm_s using update request processor. Then reloaded the schema and reindexed . But while querying using this <code>select nm from test_data where solr_query='{"q": "(-nm:(sssss))"  ,"paging":"driver","sort":"nm_s asc"}';</code></p>

<p>I am getting the following error:</p>

<pre><code>...enable docvalues true n reindex or place useFieldCache=true...
</code></pre>

<p><strong>2)</strong> How can I ensure that the value nm_s is properly updated? Is there any way to see the value of nm_s?</p>

<p><strong>3)</strong> Why am I getting  the above mentioned error even if docValues is enabled?</p>