title: Sitecore Solr index FieldNameTranslator is null
body: <p>I am currently playing around with Sitecore indexes - both solr and lucene.</p>
  
  <p>I have made my own custom index and it works fine for lucene, but I cannot get it to work with Solr.</p>
  
  <p>My problem is that the FieldNameTranslator is null for my index whenever I use the Solr configuration.</p>
  
  <p>I am using the Sitecore ContentSearch dlls to get the indexes in the following manner:</p>
  
  <pre><code> this.IndexName = indexName;
   this.index = ContentSearchManager.GetIndex(indexName);           
   var i = ContentSearchManager.GetIndex("sitecore_master_index");
  </code></pre>
  
  <p>As a test I also tried fetching the sitecore_master_index and that seems to work. I get the following:</p>
  
  <p><a href="https://i.stack.imgur.com/rjop0.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/rjop0.png" alt="enter image description here"></a></p>
  
  <p>I get an index, but whenever I query it by calling GetQueryable, then it fails with the following error:</p>
  
  <blockquote>
    <p>Exception: System.ArgumentNullException Message: Value cannot be null.
    Parameter name: fieldNameTranslator Source:
    Sitecore.ContentSearch.Linq.Solr    at
    Sitecore.ContentSearch.Linq.Solr.SolrIndexParameters..ctor(IIndexValueFormatter
    valueFormatter, IFieldQueryTranslatorMap<code>1 fieldQueryTranslators,
    FieldNameTranslator fieldNameTranslator, IExecutionContext[]
    executionContexts, IFieldMapReaders fieldMap, Boolean
    convertQueryDatesToUtc)    at
    Sitecore.ContentSearch.SolrProvider.LinqToSolrIndex</code>1..ctor(SolrSearchContext
    context, IExecutionContext[] executionContexts)    at
    Sitecore.ContentSearch.SolrProvider.SolrSearchContext.GetQueryable[TItem](IExecutionContext[]
    executionContexts)</p>
  </blockquote>
  
  <p>I am using SolrNet as IOC which, from what I can read in the documentation, should work from 8.2 and upwards. If I use one of the other IOCs then it works just fine.</p>
  
  <p>So my question is really what could go wrong here? And can somebody explain to me what the FieldNameTranslator is and how it is initiated in configuration? (where I suppose it is set)</p>