title: Solr get the last-indexed-time programmatically
body: <p>I am using apache solr-6.0.0</p>
  
  <p>I have a collection : my-search</p>
  
  <p>whenever I run a delta-import, the last_index_time in the dataimport.properties file is getting updated. </p>
  
  <p>Is there a way to get this value using an api call? and if Yes how can that value be read using solrj library?</p>
  
  <p>using the following api I am able to read the content of the file:</p>
  
  <blockquote>
    <p><a href="http://localhost:8983/solr/my-search/admin/file?wt=json&amp;file=dataimport.properties" rel="nofollow noreferrer">http://localhost:8983/solr/my-search/admin/file?wt=json&amp;file=dataimport.properties</a></p>
  </blockquote>
  
  <p>The response looks like : </p>
  
  <pre><code>#Thu Mar 23 10:00:01 UTC 2017
  name.last_index_time=2017-03-23 10\:00\:01
  last_index_time=2017-03-23 10\:00\:01
  </code></pre>
  
  <p>using solrj java library, I am doing the following:</p>
  
  <pre><code>ModifiableSolrParams params = new ModifiableSolrParams();
  params.set("qt", "/admin/file");
  params.set("file", "dataimport.properties");
  params.set("contentType", "text/plain;charset=utf-8");
  
  try
  {
      return this.solr.query(collectionName, params);
  }
  catch (Exception e)
  {
      logger.info("Exception msg: "  + e.getMessage());
  }
  </code></pre>
  
  <p>But I am getting error saying:</p>
  
  <pre><code>org.apache.solr.client.solrj.impl.HttpSolrClient$RemoteSolrException: Error from server at http://localhost:8983/solr/cdi-search: Expected mime type application/octet-stream but got text/plain. #Thu Mar 23 10:00:01 UTC 2017
  name.last_index_time=2017-03-23 10\:00\:01
  last_index_time=2017-03-23 10\:00\:01
  </code></pre>
  
  <p>I changed the contentType to application/octet-stream. But now the error is :</p>
  
  <pre><code>org.apache.solr.client.solrj.impl.HttpSolrClient$RemoteSolrException: Error from server at http://localhost:8983/solr/cdi-search: Invalid version (expected 2, but 35) or the data in not in 'javabin' format
  </code></pre>