0

I am trying to fix my shards with the following command

java -cp lucene-core-4.10.2.jar -ea:org.apache.lucene... org.apache.lucene.index.CheckIndex /var/lib/elasticsearch/elasticsearch/nodes/0/indices/XXX/0/index/ -fix

But I am getting the following error

Error: Could not find or load main class org.apache.lucene.index.CheckIndex
Ironman
  • 173
  • 1
  • 3
  • 10
  • It probably isn't finding lucene-core-4.10.2.jar . Try specifying a full, absolute path to the jar, see if that works. – femtoRgon Apr 11 '15 at 13:28
  • Any idea where do I find the lucene-core-4.10.2.jar – Ironman Apr 11 '15 at 21:50
  • 1
    You can download it from http://archive.apache.org/dist/lucene/java/ – Prabin Meitei Apr 12 '15 at 08:50
  • 1
    Additionally, if you absolutely need to, you can have Elasticsearch do this upon startup by setting the `index.shard.check_on_startup: fix` setting in elasticsearch.yml – Lee H Apr 16 '15 at 04:00
  • will it work because in current document they mentioned "The same as false. This option is deprecated and will be completely removed in 7.0." https://www.elastic.co/guide/en/elasticsearch/reference/current/index-modules.html#_static_index_settings – Nikhil.J Dec 11 '18 at 14:16

1 Answers1

0

You have to run this command from the jars directory. They are at /usr/share/elasticsearch/lib in my ubuntu distribution.