Difference between revisions of "SUNScholar/Indexes/Rebuild"
Jump to navigation
Jump to search
| Line 2: | Line 2: | ||
'''[[SUNScholar/Browse Indexes|Back to Browse Indexes]]''' | '''[[SUNScholar/Browse Indexes|Back to Browse Indexes]]''' | ||
</center> | </center> | ||
| + | ==Example Script== | ||
| + | Create a scripts folder. | ||
| + | |||
| + | mkdir /home/dspace/scripts | ||
| + | |||
| + | Edit the script. | ||
| + | |||
| + | nano /home/dspace/scripts/build-indexes | ||
| + | |||
| + | Copy and paste the following. | ||
| + | <pre> | ||
| + | #!/bin/bash | ||
| + | # Build new index | ||
| + | echo "Building new search and browse indexes... Please wait" | ||
| + | /home/dspace/bin/dspace index-init | ||
| + | </pre> | ||
| + | {{NANO}} | ||
| + | Make the script executeable. | ||
| + | chmod 0755 /home/dspace/scripts/build-indexes | ||
| + | |||
| + | Then run the script as follows | ||
| + | /home/dspace/scripts/build-indexes | ||
==References== | ==References== | ||
Revision as of 09:39, 24 January 2014
Back to Browse Indexes
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 # Build new index echo "Building new search and browse indexes... Please wait" /home/dspace/bin/dspace index-init
- 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)
Make the script executeable.
chmod 0755 /home/dspace/scripts/build-indexes
Then run the script as follows
/home/dspace/scripts/build-indexes