title: Undefined filed exception when searching with facet in solr
body: <p>I am using a facet field in my solr query. The query has fired almost 100000 times in the last 3 days. Out of all these times it has intermittently failed 4 times with the below exception:</p>
  
  <pre><code>undefined field: "facetfieldname"
  </code></pre>
  
  <p>Not sure what the issue is. Below is my decoded query:</p>
  
  <pre><code>q=tenantid:"value"+AND+appinstid:"value"+AND+status:"Open"&amp;shard.shuffling.strategy=SEED&amp;shard.shuffling.seed=value&amp;terms=true&amp;rows=0&amp;start=0&amp;facet.field=facetfield&amp;facet=true&amp;facet.limit=-1&amp;facet.mincount=0&amp;facet.offset=0
  </code></pre>
  
  <p>Below is the full stack trace:</p>
  
  <pre><code> at java.lang.Thread.run(Thread.java:748) [na:1.8.0_144]
   at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) [na:1.8.0_144]
   at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) [na:1.8.0_144]
   at java.util.concurrent.FutureTask.run(FutureTask.java:266) [na:1.8.0_144]
   at com.xxxx.scheduler.impl.SchedulerTaskManager$TaskWrapper.call(SchedulerTaskManager.java:621) [scheduler-18.2.3.0-SNAPSHOT.jar:na]
   at com.xxxx.scheduler.impl.NonAnalyticsTask$SchedulerTaskCallable.call(NonAnalyticsTask.java:145) [scheduler-18.2.3.0-SNAPSHOT.jar:na]
   at com.xxxx.scheduler.impl.NonAnalyticsTask$SchedulerTaskCallable.call(NonAnalyticsTask.java:212) [scheduler-18.2.3.0-SNAPSHOT.jar:na]
   at com.xxxx.scheduler.util.UpdatePolicyCountUtil.updatePolicyCount(UpdatePolicyCountUtil.java:82) ~[scheduler-18.2.3.0-SNAPSHOT.jar:na]
   at com.xxxx.services.eventmgt.impl.AlertEventManagerImpl.searchPolicyEventCountUsingSolr(AlertEventManagerImpl.java:602) ~[event-management-service-18.2.3.0-SNAPSHOT.jar:na]
   at com.xxxx.common.dao.impl.search.SolrClient.executeQuery(SolrClient.java:403) ~[data-access-service-18.2.3.0-SNAPSHOT.jar:na]
   at com.xxxx.common.dao.impl.search.SolrClient.runQuery(SolrClient.java:588) ~[data-access-service-18.2.3.0-SNAPSHOT.jar:na]
   at org.apache.solr.client.solrj.SolrServer.query(SolrServer.java:301) ~[solr-solrj-4.8.0.jar:4.8.0 1589874 - thetaphi - 2014-04-24 20:55:02]
   at org.apache.solr.client.solrj.request.QueryRequest.process(QueryRequest.java:91) ~[solr-solrj-4.8.0.jar:4.8.0 1589874 - thetaphi - 2014-04-24 20:55:02]
   at org.apache.solr.client.solrj.impl.HttpSolrServer.request(HttpSolrServer.java:206) ~[solr-solrj-4.8.0.jar:4.8.0 1589874 - thetaphi - 2014-04-24 20:55:02]
   at org.apache.solr.client.solrj.impl.HttpSolrServer.request(HttpSolrServer.java:210) ~[solr-solrj-4.8.0.jar:4.8.0 1589874 - thetaphi - 2014-04-24 20:55:02]
   at org.apache.solr.client.solrj.impl.HttpSolrServer.executeMethod(HttpSolrServer.java:554) ~[solr-solrj-4.8.0.jar:4.8.0 1589874 - thetaphi - 2014-04-24 20:55:02]
  org.apache.solr.client.solrj.impl.HttpSolrServer$RemoteSolrException: undefined field: "facetfieldname"
  </code></pre>
  
  <p>My solr mapping xml contains the below:</p>
  
  <pre><code>&lt;field name="facetfieldname" type="string" indexed="true" stored="true" /&gt;
  </code></pre>
  
  <p>Adding version details:</p>
  
  <pre><code>[cqlsh 5.0.1 | Cassandra 2.1.15.1403 | DSE 4.8.9 | CQL spec 3.2.1 | Native protocol v3]
  </code></pre>
  
  <p>Can someone please help out.</p>