use CB/bin/create_core.php script or do manualy:
This command will create a new SOLR core named cb_mycore based on cb_default configSet. This command creates the folder /var/solr/data/cb_mycore and the core.properties file.
Notice that '&' is quoted to make curl work
Usually you'll use CB/bin/create_core.php and the above will be performed for you.
CB_core related files are located in /CB/httpsdocs/cores/[core], create the folder if it doesn't exists yet. Your custom SOLR schema should be added to solr subfolder (created by the instructions below).
# Copy solrconfig.xml # from: /CB/sys/solr_configsets/default_config/conf/ # to: /CB/httpsdocs/cores/[core] > cp /var/www/html/casebox/sys/solr_configsets/default_config/conf/solrconfig.xml /var/www/html/casebox/httpsdocs/cores/[core]/solr/solrconfig.xml # Copy (or use your own) stopwords.txt # from: /CB/sys/solr_configsets/default_config/conf/ # to: /CB/httpsdocs/cores/[core] > cp /var/www/html/casebox/sys/solr_configsets/default_config/conf/stopwords.txt /var/www/html/casebox/httpsdocs/cores/[core]/solr/stopwords.txt # Create symlink to CB SOLR configs > ln -s /var/www/html/casebox/sys/solr_configsets/default_config /var/www/html/casebox/httpsdocs/cores/[core]/solr/cb_default # Create 'core' folder in SOLR > mkdir /var/solr/data/cb_[core] > chown solr:solr /var/solr/data/cb_[core] # create symlink to custom SOLR config > ln -s /var/www/html/casebox/httpsdocs/cores/[core]/solr /var/solr/data/cb_[core]/conf # use SOLR CoreAdminAPI to create the core > curl http://localhost:8983/solr/admin/cores?action=CREATE'&'name=cb_[core] # ok, now cb_[core] SOLR core is ready
For Windows, symlinks are created as follows:
mklink /J c:/var/www/casebox/httpsdocs/cores/[core]/solr/cb_default c:/var/www/casebox/sys/solr_configsets/default_config mklink /J c:/var/solr/data/cb_[core]/conf e:/var/www/casebox/httpsdocs/cores/[core]/solr
To delete a SOLR core and all data:
Modified records in MySql database will be indexed in SOLR. If you need to reindex a core (you've moved it to another server and SOLR core is empty, or SOLR has been upgraded and full reindex is required) you need to call this script:
-a: mark all records to be reindexed.
-l: means no-limit. By default, up to 500 records are indexed in SOLR when you run the script. Specify -l to remove this limit. Notice: you might get an "Out of memory" error, just run the script again (but without -a of course).
solr_reindex_core.php script is used to index MySql database into SOLR core. If -a parameter is specified, CB will only mark all records to be reindexed. -l parameter means that CB should attempt to reindex as much as possible (no limits). If the database is huge, you might get an "Out of memory error". Just launch reindexing again (but without "-a" as it will mark all records again).
To test a script that imports thousands of records, you'd need to clean up the database before doing another import. Instead of restoring an empty dump of the database for each import test (and having to reindex all the data in SOLR), you can delete the records from MySql and SOLR:
Install PHP, Apache from REMI56 repository:
Install ImageMagick & imagick.
Make sure you have these installed:
For code coverage to run, xdebug is required, see this article for example Installing Xdebug on CentOS