# Logstash not indexing in Solr

**URL:** <https://discuss.elastic.co/t/logstash-not-indexing-in-solr/73243>\
**Category:** Logstash\
**Created:** [January 30, 2017, 4:31pm UTC](https://discuss.elastic.co/t/logstash-not-indexing-in-solr/73243 "2017-01-30T16:31:34Z")\
**Posts on this page:** 1\
**Showing post:** 7

<div class="post-metadata">

**Author:** ![guy\_davis](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/guy_davis/32/7068_2.png) [@guy\_davis](https://discuss.elastic.co/u/guy_davis)\
**Post date:** [February 3, 2017, 9:02pm UTC](https://discuss.elastic.co/t/logstash-not-indexing-in-solr/73243/7 "2017-02-03T21:02:46Z")

</div>

Yes, it feels very lonely trying to use the SILK logging stack instead of the much more popular ELK stack. Here's what I needed to do for Logstash to Solr on CentOS 7:

**Assuming you've already installed Logstash on CentOS or similar**  
sudo /usr/share/logstash/bin/logstash-plugin install logstash-output-solr\_http  
# Fix for [Solr6 & Logstash 5: timestamp error](https://discuss.elastic.co/t/solr6-logstash-5-timestamp-error/67223)  
sudo sed -i.bak -e 's/document["@timestamp"]/#document["@timestamp"]/g' /usr/share/logstash/vendor/bundle/jruby/1.9/gems/logstash-output-solr\_http-3.0.1/lib/logstash/outputs/solr\_http.rb

# Fix for [https://github.com/logstash-plugins/logstash-output-solr\_http/issues/3](https://github.com/logstash-plugins/logstash-output-solr_http/issues/3)

# Note, I could instead have added a soft commit below the add: @solr.commit :commit\_attributes =\> {:softCommit =\> true}

sudo sed -i -e 's/@solr.add(documents)/@solr.add(documents, :add\_attributes =\> {:commitWithin=\>1000})/g' /usr/share/logstash/vendor/bundle/jruby/1.9/gems/logstash-output-solr\_http-3.0.1/lib/logstash/outputs/solr\_http.rb\

Basically, the version of this plugin in Github fails to ever commit so no log events are ever searchable.

Hope this helps,  
Guy

---

_[View the full topic](https://discuss.elastic.co/t/logstash-not-indexing-in-solr/73243)._
