Sign In Start Free Trial
Account

Add to playlist

Create a Playlist

Modal Close icon
You need to login to use this feature.
  • Book Overview & Buying Solr Cookbook - Third Edition
  • Table Of Contents Toc
  • Feedback & Rating feedback
Solr Cookbook - Third Edition

Solr Cookbook - Third Edition

By : Rafal Kuc
3.8 (6)
close
close
Solr Cookbook - Third Edition

Solr Cookbook - Third Edition

3.8 (6)
By: Rafal Kuc

Overview of this book

This book is for intermediate Solr Developers who are willing to learn and implement Pro-level practices, techniques, and solutions. This edition will specifically appeal to developers who wish to quickly get to grips with the changes and new features of Apache Solr 5.
Table of Contents (12 chapters)
close
close
11
Index

Using the check index functionality

It's night; the phone is ringing, you answer it and hear: "We've got a problem—the index is corrupted, nothing works, the apocalypse is coming". What can we do? Is there anything besides the full indexation or restoring from backup? There is something that we can do and this recipe will show you.

How to do it...

For the purpose of this recipe, let's suppose that we have a corrupted index that we want to check and fix. To use the CheckIndex class that we will use, we will need to point it to the index we want to fix. We will need to run a command similar to the following one:

java –cp LUCENE_JAR_LOCATION -ea:org.apache.lucene... org.apache.lucene.index.CheckIndex INDEX_PATH -fix

Here, INDEX_PATH is the path to the index, for example, /usr/share/solr/data/index and LUCENE_JAR_LOCATION is the path to the Lucene core JAR library (which is provided with the Solr distribution). So, with the given index location, the command...

Unlock full access

Continue reading for free

A Packt free trial gives you instant online access to our library of over 7000 practical eBooks and videos, constantly updated with the latest in tech
bookmark search playlist font-size

Change the font size

margin-width

Change margin width

day-mode

Change background colour

Close icon Search
Country selected

Close icon Your notes and bookmarks

Delete Bookmark

Modal Close icon
Are you sure you want to delete it?
Cancel
Yes, Delete

Confirmation

Modal Close icon
claim successful

Buy this book with your credits?

Modal Close icon
Are you sure you want to buy this book with one of your credits?
Close
YES, BUY