Difference between revisions of "SUNScholar/Indexes/Rebuild"

From Libopedia
Jump to navigation Jump to search
m
m
Line 4: Line 4:
 
  '''[[SUNScholar/SOLR Discovery|Back to SOLR Discovery Search and Browse Indexes]]'''
 
  '''[[SUNScholar/SOLR Discovery|Back to SOLR Discovery Search and Browse Indexes]]'''
 
</center>
 
</center>
 +
 +
==[[SUNScholar/Rebuild_DSpace|Rebuild DSpace]]==
 +
Click on the heading above.
  
 
==Example Script==
 
==Example Script==

Revision as of 18:30, 9 September 2014

Back to non-SOLR Search and Browse Indexes
Back to SOLR Discovery Search and Browse Indexes

Rebuild DSpace

Click on the heading above.

Example Script

Create a scripts folder.

mkdir /home/dspace/scripts

Edit the script.

nano /home/dspace/scripts/build-indexes

Copy and paste the following.

#!/bin/bash

echo "Building SOLR discovery search and browse indexes... Please wait"
/home/dspace/bin/dspace update-discovery-index -b -f

## This is only required if you use the old browse indexes ##
## Since DSpace version 4.2, discovery is default ##
## Uncomment the lines below with a single hash to enable, if needed ##
#echo "Building non-SOLR search and browse indexes... Please wait"
#sudo service tomcat6 stop
#sleep 5
#/home/dspace/bin/dspace index-init
#sudo service tomcat6 start

Make the script executable.

chmod 0755 /home/dspace/scripts/build-indexes

Now you can re-build your indexes WHEN NEEDED by simply typing;

/home/dspace/scripts/build-indexes

NANO Editor Help
CTL+O = Save the file and then press Enter
CTL+X = Exit "nano"
CTL+K = Delete line
CTL+U = Undelete line
CTL+W = Search for %%string%%
CTL+\ = Search for %%string%% and replace with $$string$$
CTL+C = Show line numbers

More info = http://en.wikipedia.org/wiki/Nano_(text_editor)


References