EPrints Technical Mailing List Archive
Message: #02780
< Previous (by date) | Next (by date) > | < Previous (in thread) | Next (in thread) > | Messages - Most Recent First | Threads - Most Recent First
[EP-tech] Re: Updating Subjects
- To: "'eprints-tech@ecs.soton.ac.uk'" <eprints-tech@ecs.soton.ac.uk>
- Subject: [EP-tech] Re: Updating Subjects
- From: John Salter <J.Salter@leeds.ac.uk>
- Date: Mon, 17 Mar 2014 09:53:00 +0000
Hi Eliseo, There’s two sides to this: - getting the new subjects created - moving eprints from the old subjects to the new ones. If possible, I’d look at getting the new subjects into order first – as you’ve already identified, either via the web interface or the import (you might want to look at the subject export too – which might be useful to do, add your new subjects and then re-import). Creating a new set of nodes is (IMO) easier than trying to rework the existing ones as they are stored in the database as both child and parent trees, so you’d possibly have to make changes to stuff in all these tables: subject subject__index subject__index_grep subject__ordervalues_en subject__rindex subject_ancestors subject_name_lang subject_name_name subject_parents To move the eprints from one node to another, if it’s a straight swap (e.g. subjectid_A is replaced by subjected_1; subjectid_B is replaced by subjectid_2 etc.), it’s fairly easy to do in the database (you could even clone the eprint_subjects table and do the updates in the new copy to be on the safe side). mysql> UPDATE eprint_subjects SET subject = newSubjectID where subject = oldSubjectID; I find the following query useful to see if there are any subjects use, but not defined: mysql> select count(*), subject, pos from eprint_subjects where subject NOT IN (select subjectid from subject) group by subject, pos; Hope that helps a bit – someone else might have some better/easier ways of doing this! Cheers, John From: eprints-tech-bounces@ecs.soton.ac.uk [mailto:eprints-tech-bounces@ecs.soton.ac.uk] On Behalf Of Eliseo Gatchalian Hi, I know that we can add and edit the subjects by logging in as admin and can also import a subject_xml file, but If we are to merge some subjects with different subject code into one, is there an automatic way to update the subject codes for the items already submitted in the archive? I saw the eprints_subject table wherein we can replace the subject field with the new codes and update the items but I’m not sure if there are anything else that we need to update? Thanks!
This electronic mail transmission is intended for the named recipients only. It may contain private and confidential information. If this has come to you in error you must take no action based upon it, nor must you copy it or show it to anyone; please telephone or email the sender at Wintec immediately and return the original email. We cannot accept any liability for any loss or damage sustained as a result of software viruses. It is your responsibility to carry out such virus checking as is necessary before opening any attachment which may be included with this message. |
- Follow-Ups:
- [EP-tech] Re: Updating Subjects
- From: Sebastien Francois <sf2@ecs.soton.ac.uk>
- [EP-tech] Re: Updating Subjects
- References:
- [EP-tech] Updating Subjects
- From: Eliseo Gatchalian <Eliseo.Gatchalian@wintec.ac.nz>
- [EP-tech] Updating Subjects
- Prev by Date: [EP-tech] An invalid XML character (Unicode: 0xe) was found in the element content of the document.
- Next by Date: [EP-tech] Re: Updating Subjects
- Previous by thread: [EP-tech] Updating Subjects
- Next by thread: [EP-tech] Re: Updating Subjects
- Index(es):