Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

document manual reindex, example solr query #5629

Merged
merged 2 commits into from Mar 18, 2019
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
37 changes: 37 additions & 0 deletions doc/sphinx-guides/source/admin/solr-search-index.rst
Expand Up @@ -45,3 +45,40 @@ If indexing stops, this command should pick up where it left off based on which

``curl http://localhost:8080/api/admin/index/continue``

Manual Reindexing
-----------------

If you have made manual changes to a dataset in the database or wish to reindex a dataset that solr didn't want to index properly, it is possible to manually reindex dataverses and datasets.

To reindex dataverses:
~~~~~~~~~~~~~~~~~~~~~~

Dataverses must be referenced by database object ID. If you have direct database access an SQL query such as

``select id from dataverse where alias='datavarsealias';``

should work, or you may click the Dataverse's "Edit" menu and look for dataverseId= in the URLs produced by the drop-down. Then, to re-index:

``curl http://localhost:8080/api/admin/index/dataverses/135``

which should return: _{"status":"OK","data":{"message":"starting reindex of dataverse 135"}}_

To reindex datasets:
~~~~~~~~~~~~~~~~~~~~

Datasets may be referenced by persistent ID or by database object ID. To re-index by persistent ID:

``curl http://localhost:8080/api/admin/index/dataset?persistentId=doi:10.5072/FK2/AAA000``

To re-index a dataset by its database ID:

``curl http://localhost:8080/api/admin/index/datasets/7504557``

Manually Querying Solr
----------------------

If you suspect something isn't indexed properly in solr, you may bypass the Dataverse web interface and query the command line directly to verify what solr returns:

``curl "http://localhost:8983/solr/collection1/select?q=dsPersistentId:doi:10.15139/S3/HFV0AO"``

to see the JSON you were hopefully expecting to see passed along to Dataverse.