Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Code Block
% cd ~/code/admin/lucene
% mvn install -PReindex -Drun.config=/home/ihtsdo/config/config.properties -PReindex

Sample command line call of the admin tool to reindex only certain data structurestypes:

Code Block
# Re-indexes only map records and tracking records
% cd ~/code/admin/lucene
% mvn install -PReindex -Drun.config=/home/ihtsdo/config/config.properties -PReindex -Dindexed.objects=MapRecordJpa,TrackingRecordJpa 

...

Troubleshooting
Sometimes issues arise with the indexes (in particular when running admin tools while the Tomcat server is also running). Occasionally it is necessary to completely reindex all objects from scratch. When this is needed, the recommended approach is to remove the index files from the index and then run this mojo. For example, to guarantee a clean index rebuild for map records, you could do this:the following.

Code Block
# stop the server
% service tomcat7 stop

# remove the index
% /bin/rm -rf /var/lib/tomcat7/indexes/lucene/indexes/*MapRecordJpa

# rebuild the index
% cd ~/code/admin/lucene
% mvn install -PReindex  -Drun.config=/home/ihtsdo/config/config.properties -PReindex -Dindexed.objects=MapRecordJpa
 
# start the server
% service tomcat7 start

...