Database bulk operations
You can employ bulk operations for databases in Brightspot. This section explains the bulk operations available to you.
The indexed methods annotation instructs Dari to index a field. Applying this annotation does not retroactively index already existing data; it only ensures that future data will be indexed.
To reindex existing data, use the Index tool. You can re-index on a single type or all types. If you select all types, all database records, regardless of visibility label, will be reindexed. However, if you select a specific type, only visible records will be reindexed.
Records being reindexed are queried for using resolveToReferenceOnly, so any indexed methods which depend on values in referenced (non-embedded) records will not be calculated correctly. You can work around this issue by explicitly resolving the references in the indexed method, or by writing your own reindexing task.
When you start the reindex process, a link appears to the background task that reindexes existing objects. Click the link to monitor the background task.
Use the Copy tool to copy data from one database to another. The Copy tool is often used when a new MySQL database is added and the Solr database needs to be created. Copying SQL to Solr populates the Solr database with the SQL data.
Another use case is to resynchronize databases that are no longer in sync.
You can copy records from a single type or records of all types. If you select all types, all database records, regardless of visibility label, will be copied. However, if you select a specific type, only visible records will be copied.
If you select Delete before copy
, all of the records of the selected type will be deleted from the destination database before beginning the copy. You will probably want to select this if you just loaded a fresh MySQL database, or if you are resynchronizing the databases. If you do not select this option in these cases, queries could return inconsistent data depending on which database is queried.
The records are saved to the destination database using saveUnsafely
, so the save life cycle will not be triggered. For more information, see Save life cycle.