Difference between revisions of "SUNScholar/Indexes/Rebuild"
Jump to navigation
Jump to search
m |
m (→Example Script) |
||
| Line 23: | Line 23: | ||
## This is only required if you use the old browse indexes ## | ## This is only required if you use the old browse indexes ## | ||
## Since DSpace version 4.2, discovery is default ## | ## Since DSpace version 4.2, discovery is default ## | ||
| − | ## Uncomment | + | ## Uncomment the lines below with a single hash to enable, if needed ## |
#echo "Building search indexes... Please wait" | #echo "Building search indexes... Please wait" | ||
| + | #sudo service tomcat6 stop | ||
| + | #sleep 5 | ||
#/home/dspace/bin/dspace index-init | #/home/dspace/bin/dspace index-init | ||
| + | #sudo service tomcat6 start | ||
</pre> | </pre> | ||
Revision as of 21:50, 8 September 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 browse indexes ## ## Since DSpace version 4.2, discovery is default ## ## Uncomment the lines below with a single hash to enable, if needed ## #echo "Building search 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
- https://wiki.duraspace.org/display/DSPACE/Configure+full+text+indexing
- https://wiki.duraspace.org/display/DSPACE/Re-index+DSpace
- https://wiki.duraspace.org/display/DSDOC4x/Legacy+methods+for+re-indexing+content
- https://wiki.duraspace.org/pages/viewpage.action?pageId=32474035
- https://wiki.duraspace.org/display/DSDOC18/ReIndexing+Content+%28for+Browse+or+Search%29