title: Set default search fields in Apache Solr
body: <p>I am trying to Implement <a href="http://lucene.apache.org/solr/" rel="noreferrer">Apache Solr</a> search through <a href="https://github.com/mausch/SolrNet" rel="noreferrer">SolrNet</a> library.So far I have managed to run an instance of Solr in my machine and make some queries based on specific fields.
  My code to do it looks like this</p>
  
  <pre><code>   var solr = ServiceLocator.Current.GetInstance&lt;ISolrOperations&lt;Product&gt;&gt;();
     var results = solr.Query(new SolrQueryByField("id", "SP2514N"));
  </code></pre>
  
  <p>This one works fine now,But I would like to make queries with out specifying a field , So that when I enter a search key word solr will look in to the all fields available and return a result.I have Found the code to make it in SolrNet library from <a href="https://github.com/mausch/SolrNet/blob/master/Documentation/Querying.md" rel="noreferrer">here</a></p>
  
  <pre><code>        var solr = ServiceLocator.Current.GetInstance&lt;ISolrOperations&lt;Product&gt;&gt;();
          var results = solr.Query(new SolrQuery("SP2514N"));
  </code></pre>
  
  <p>But this never worked,When I drilled down to bottom ,I found that I need to set default search fields in Solr instance so that Solr will search that fields when nothing else is selected(This is how i understood it I am not sure about this).
  So I went to set default fields in Solr ,I took <strong>Solrconfig.XML</strong> and edited it like this</p>
  
  <pre><code>    &lt;requestHandler name="/query" class="solr.SearchHandler" default="true"&gt;
       &lt;lst name="defaults"&gt;
         &lt;str name="echoParams"&gt;explicit&lt;/str&gt;
         &lt;str name="wt"&gt;json&lt;/str&gt;
         &lt;str name="indent"&gt;true&lt;/str&gt;
         &lt;str name="df"&gt;text&lt;/str&gt;
         &lt;str name="df"&gt;id&lt;/str&gt;
       &lt;/lst&gt;
    &lt;/requestHandler&gt;
  </code></pre>
  
  <p>[just added  <code>&lt;str name="df"&gt;id&lt;/str&gt;</code> this field as extra].But this too never helped And I am stuck ,Can any one tell me How I could set default search field in Solr correctly?Or am i doing any thing else wrong?
  <strong><a href="http://tempsend.com/1BD1477716" rel="noreferrer">I have Uploaded My Solrconfig file here</a></strong></p>