Administration Guide : Command-line manual pages

SOLRUTIL(8) manual page

Name

solrutil - program for managing the Venture Solr search database

Synopsis

solrutil [ -D | -d dblev ] [ -ipport addr ] ...

Description

The solrutil utility can be used to update and administer the Solr search database. It accepts a number of actions to perform, outlined below. With no arguments, a usage message is produced.

Options

-D
Turns on full debugging.
-d dblev
Turns on debugging at a certain level, represented by dblev (in hex).
-ipport addr
Specifies the location (addr is usually host:port) of the Solr database, overriding what's stored in the config file /usr/etc/venture/var/solr.conf.

Actions

-corestatus corename corefield
Outputs information about a specific core value. corename specifies the name of the core (currently Xinet only uses 1 core named file ). corefield can be one of instanceDir, dataDir, config, schema, startTime or uptime. Full core information can be obtained via the browser (from a default local install) using http://localhost:15969/solr/admin/cores?action=STATUS&core=file&wt=json&indent=true
-checkdb
Scans the Venture database for potential data problems. Issues reported from this scan should be fixed in order to enable correct ingestion of data into Solr. This option checks for empty utf8name fields in the file table as well as invalid dates, integer, floating point and boolean field values in the keyword1 table. When ingesting data, solrutil sends multiple database records to Solr for indexing. Invalid data may cause the indexing operation to fail for a given batch of records, resulting in missing data.
-datadir
Prints the location of the Solr data directory. This is equivalent to `solrutil -corestatus file dataDir'.
-delete fileidlist
Removes records pertaining to the list of comma separated File IDs from the Solr database.

Example : solrutil -delete 12,19,44

When specifying the file ID of a folder, it should be noted that all entries within this folder are NOT deleted from Solr.

-disable
Permanently disable (shutdown) Solr. Although disabling Solr does not immediately delete indexed data from disk, the only option available after disabling is re-initialization via the -init action. It is during this initialization that any previous indexed data is deleted. If you do not wish to completely rebuild the Solr index, it is recommended that you stop Solr via the -stop action.
-export path
Used in conjunction with -update , -post , -qpost and -updatepath , this option exports the data that would have been sent to Solr to the specified location. Files are named 00001.json, 00002.json etc.

Example : solrutil -update 1,2,3 -export /outDir

-init path
Initialize Solr and create the search core in the path provided. When initializing Solr, any previous Solr database instances found at the specified path location will automatically be deleted. Initialization will start Solr, sync the schema from the Venture database and ingest all files (see the -post action for restrictions). Ingestion consists of data from the Venture database's file , keyword , comments , textrun and annotations tables. See the -qinit action for quicker initialization.
-movecoredata name path
Allow relocation of the specified cores indexed data. The default location is /usr/etc/venture/solr/server/xinet/file/data.

Example : solrutil -movecoredata file /volume/solrdata

-post
Imports the entire contents of the Venture database into Solr. File, keyword, comments, text run and annotation information is imported for every record. Records that already exist in the Solr index will automatically be updated. Unlike -init, which deletes and completely rebuilds the Solr database, a -post will add new records, delete removed records (records whose status have changed to archived=0 and online=0), and update existing records. During the post action the entire contents of the Solr database is available for searching.

Note : if the Venture and Solr databases become out of sync, it is usually better to perform the -post rather than the -init action to re-synchronize. Before running a manual -post , we recommend running "solrutil -schema" first to ensure the schema is up-to-date prior to importing data.

During import, files with the status archived=0 and online=0, files hidden via finder flags and files whose first character begins with a `.' will not be imported. Files that would not pass a -checkdb may also be skipped.

-purgedeleted
Checks the Venture database against the Solr database and deletes any records from Solr that have been completely removed from Venture.
-qinit <path>
Provides a quicker way of initializing Solr. This command operates the same as -init . However, to speed up initial ingestion and to get Solr up and running quicker, this option only imports data from the file table. Keyword, comment, annotations and text run data is not imported. This data may be imported at a later time using the -post action.
-qpost
Provides a quicker method of importing file information into Solr. This action operates the same as -post . However, to speed up synchronization of Venture database data to Solr, only data from the file table is imported. Keyword, comment, annotations and text run data is not imported. This data may be imported at a later time using the -post action. Caution should be used when using this option, as existing records will have keyword, comment, text run and annotations data deleted as part of the quick update.
-reparent fileidlist
Updates records recursively when they have been moved between volumes.
-schema
Synchronize the schema between the Venture database and Solr. This ensures all fields are present in the Solr database ready for indexing.
-shutdown
Shuts down Solr database and marks in the configuration file that it is administratively shut down, preventing auto-restart. Solr may be restarted with the -start action.
-start
Starts Solr. Solr can only be started if it has been stopped. It cannot be started if disabled via the -disable action.
-stop
Stops Solr. Once stopped, no more data will be synchronized from the Venture database to Solr. While Solr is down, dblogd(8) waits patiently with its growing list of files that have been created or updated. When Solr comes back online (via the -start action), dblogd will continue with all the updates.

If you believe your Venture database and Solr are still out of sync after Solr has been started and dblogd has had time to relay all events to solrutil, see the -post action for further information.

-unloadcore name
Unloads the named Solr core. Cores are typically unloaded only during -movecoredata actions.
-update fileidlist
Exports data from the Venture database to Solr for the list of specified File IDs. If one of the IDs represents a folder that has been moved or renamed, solrutil will automatically update all records recursively, ensuring information for all files/folders within the specified folder are updated. See the -post action for restrictions.
-updatepath path
Exports data from the Venture database to Solr for the specified path and all of its subfolders. See the -post action for restrictions.
-updatestats
Updates the Solr statistics cache (located in /usr/etc/venture/solr/cachedstats) for faceted fields. Updating of statistics is automatic and does not need to be done manually.
-v
Prints the version of solrutil.

See Also

dblogd(8)

Files

/usr/etc/venture/bin/solrutil
/usr/etc/venture/var/solr.conf
/usr/etc/venture/solr/server/xinet/file/data