Difference between revisions of "SUNScholar/Indexes/Rebuild"

From Libopedia
Jump to navigation Jump to search
Line 19: Line 19:
  
 
echo "Building discovery indexes... Please wait"
 
echo "Building discovery indexes... Please wait"
/home/dspace/bin/dspace update-discovery-index -b
+
/home/dspace/bin/dspace update-discovery-index -b -f
  
echo "Building search indexes... Please wait"
+
## This is only required if you use the old indexes ##
/home/dspace/bin/dspace index-init
+
## Uncomment both lines below to enable ##
 +
#echo "Building search indexes... Please wait"
 +
#/home/dspace/bin/dspace index-init
 
</pre>
 
</pre>
  

Revision as of 12:04, 11 August 2014

Back to Browse Indexes
Back to Discovery

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 discovery indexes... Please wait"
/home/dspace/bin/dspace update-discovery-index -b -f

## This is only required if you use the old indexes ##
## Uncomment both lines below to enable ##
#echo "Building search indexes... Please wait"
#/home/dspace/bin/dspace index-init

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