EPrints Technical Mailing List Archive

Message: #03664


< Previous (by date) | Next (by date) > | < Previous (in thread) | Next (in thread) > | Messages - Most Recent First | Threads - Most Recent First

[EP-tech] Re: Change EPrint field type.


Thanks Seb – Will do!

 

And of course I’ll try this on my test box before I make the change in production.

 

-Brian.

 

Brian D. Gregg

Solutions Architect | Manager Systems Development

University of Pittsburgh | University Library System

Address: 7500 Thomas Blvd.  Room 129 Pittsburgh, PA 15208

Tel: (412) 648-3264 | Email: bdgregg@pitt.edu | Fax: (412) 648-3585

 

From: eprints-tech-bounces@ecs.soton.ac.uk [mailto:eprints-tech-bounces@ecs.soton.ac.uk] On Behalf Of sf2
Sent: Tuesday, December 09, 2014 2:15 PM
To: eprints-tech@ecs.soton.ac.uk
Subject: [EP-tech] Re: Change EPrint field type.

 

Hola Brian,

You should be able to change it directly to "id" and run epadmin update_database_structure - it will be the no-op since "text" and "id" have the same db field definition. (in fact if you look at the source code, you'll see that "text" is a special case of "id").

Also.. in doubt, back up your DB before making the change.

Seb

On 09.12.2014 19:03, Brian D. Gregg wrote:

All,

 

We have an EPrint field that we intended to use to hold ORCIDs originally defined as ‘type’ => ‘text’ and we have done so and thus we have data in the fields already. 

 

The problem is that an advanced search for an ORCID ID will return more than just the exact ORCID ID due to the fuzzy matching imposed on a ‘text’ field.  I was advised to change this to ‘type’ => ‘id’ to force the advanced search to use exact matching.

 

My question is how can I change this field to ‘type’ => ’id’ including any database changes if they are needed (we are using MySQL)?  Obviously we edit the eprint_fields.pl file and change the definition, but what if anything else needs to be done on the database backend to accommodate this change?

 

Any help would be appreciated.

 

Thanks in advance,

Brian.

 

Brian D. Gregg

Solutions Architect | Manager Systems Development

University of Pittsburgh | University Library System

Address: 7500 Thomas Blvd.  Room 129 Pittsburgh, PA 15208

Tel: (412) 648-3264 | Email: bdgregg@pitt.edu | Fax: (412) 648-3585

 

 

*** Options: http://mailman.ecs.soton.ac.uk/mailman/listinfo/eprints-tech
*** Archive: http://www.eprints.org/tech.php/
*** EPrints community wiki: http://wiki.eprints.org/
*** EPrints developers Forum: http://forum.eprints.org/