krischer / jane

Jane - Document Database for Seismology
http://krischer.github.io/jane
GNU General Public License v3.0
27 stars 9 forks source link

Need management command for reindexing of all documents of given type #85

Open megies opened 6 years ago

megies commented 6 years ago

E.g. something like python manage.py reindex-documents quakeml, which then would delete all document index entries for document type "quakeml" and after that would reindex all quakeml documents.

megies commented 6 years ago

From very briefly looking at this issue, seems like the way to go would be to define an AdminAction "Update related Document Indices" on the Document Model like described here: https://docs.djangoproject.com/en/2.1/ref/contrib/admin/actions/

Then one could at least select the documents in the admin panel and select reindexing from the drop down menu on the documents page.

That action would have to..

No time to dig deeper how to actually do that in django right now, though.. it's still a bit cryptic to me.