-
Notifications
You must be signed in to change notification settings - Fork 3
SOLR Documentation
https://solr.apache.org/guide/8_11/about-this-guide.html
https://solr.apache.org/guide/8_11/format-of-solr-xml.html
https://solr.apache.org/guide/8_11/defining-core-properties.html
https://solr.apache.org/guide/8_11/configuring-logging.html
https://solr.apache.org/guide/8_11/configuring-solrconfig-xml.html
https://solr.apache.org/guide/8_11/overview-of-documents-fields-and-schema-design.html
https://solr.apache.org/guide/8_11/overview-of-the-solr-admin-ui.html
https://github.com/projectblacklight/blacklight/wiki/Indexing-your-data-into-solr
class MyModel < ActiveRecord::Base
after_save :index_record
before_destroy :remove_from_index
attr_accessible :field_i_want_to_index
def to_solr
# *_texts here is a dynamic field type specified in solrconfig.xml
{'id' => id,
'field_i_want_to_index_texts' => field_i_want_to_index}
end
def index_record
SolrService.add(self.to_solr)
SolrService.commit
end
def remove_from_index
SolrService.delete_by_id(self.id)
SolrService.commit
end
end
https://solr.apache.org/guide/8_11/dynamic-fields.html
https://github.com/projectblacklight/blacklight/wiki/Configuration---Solr-fields
https://samvera.github.io/building-searches.html
- Set a FREEZE on Scholar content.
- Deploy cap deploy prod
- Login into Web Server
- Change Login Route /login /error (both web servers)
- Run rake hyrax:count RAILS_ENV=Production to get a count of all works in each work type.
- Run rake scholar:pidsout RAILS_ENV=Production
- Login into Solr Server
- As the root user, stop solr with service solr stop
- Back up /var/solr to ... tar -cvf solr.tar solr
- CD /opt
- Delete the existing /opt/solr symlink... rm solr
- Download solr-8.11.1.tgz from https://solr.apache.org/downloads.html
- Uncompress solr-8.11.1.tgz to /opt/solr-8.11.1
- Create a new symlink for /opt/solr-8.11.1 to /opt/solr.... ln -s solr-8.11.1 solr
- As the root user, start solo with service solr start
- Delete everything from SOLR using the CURL command
- curl http://localhost:8983/solr/collection1/update?commit=true -H "Content-Type: text/xml" --data-binary ':'
- Login into Web Server
- bundle exec rails console production on web server
- Run solr reindex (ActiveFedora::Base.reindex_everything)
- If reindex doesn’t run than you need to create a new core on solr with the existing name pointing to the correct xml files
- If there is anything wrong with the results, then run rake scholar:resave
- Run rake hyrax:count to get a count of all works in each work type and compare results.
- Confirm upgrade was successful and release the FREEZE.
- Connect to DTS Jump Server.
- Use tmux to connect to web server.
- bundle exec rails console production
- ActiveFedora::Base.reindex_everything
- ActiveFedora::Indexing.reindex_everything is overridden to actually call Samvera::NestingIndexer.reindex_all! https://samvera.github.io/nested-indexing.html
- Samvera::NestingIndexer.reindex_all!(extent: Hyrax::Adapters::NestingIndexAdapter::FULL_REINDEX)
-
On the mysql server : /etc/my.cnf.d/mariadb-server.cnf and under the [mysqld] section add max_allowed_packet=128M restart mysqld service
-
On the mysql server : /etc/my.cnf.d/mariadb-server.cnf and under the [mysqld] section add wait_timeout=XXXX restart mysqld service
-
On the SOLR server : Add more RAM from 6 GB to 12 GB
-
On the SOLR server : Increase the HEAP size from 4GB to 10GB.
-
Update the HEAP Memory in the in /etc/default/solr.in.sh
-
SOLR_JAVA_MEM="-Xms4000m -Xmx4000m"
-
SOLR_JAVA_MEM="-Xms10000m -Xmx10000m"
-
RECOMMEND 8000m - 16000m
-
On the SOLR server : /etc/default/solr.in.sh
-
open file limit to 65000
-
max processes limit to 65000
-
GC_TUNE="-XX:-UseLargePages" JVM /etc/default/solr.in.sh