Difference between revisions of "Id field"
(→Additional Properties) |
|||
(8 intermediate revisions by 2 users not shown) | |||
Line 1: | Line 1: | ||
{{fieldtypes}} | {{fieldtypes}} | ||
− | |||
− | + | == Description == | |
+ | This metadata field is very similar to a [[Text field]], the main difference is for search where the whole value is indexed rather than in individual parts. In particular this is useful for things like ISBN or ISSN numbers which contain hyphens (<tt>-</tt>). For a text field the parts either side of the hyphen would be indexed separately but for a Id field this will be indexed as a single value. Therefore, allowing search to find only those items that match exactly. | ||
+ | |||
+ | == Inheritance == | ||
+ | * [[Metadata]] | ||
+ | ** [[Id field]] | ||
+ | |||
+ | == Additional Properties == | ||
+ | {| border="1" cellpadding="3" cellspacing="0" | ||
+ | ! Name !! Default Value !! Required? !! Description !! Notes | ||
+ | |- | ||
+ | | '''match''' || <tt>EX</tt> || NO || Searches should match string values exactly. || Default from parent default (<tt>EQ</tt>). This should not be modified in field configuration, as the purpose of Id fields is to match exactly. | ||
+ | |} | ||
+ | |||
+ | == Required Phrases == | ||
+ | No additional phrases beyond [[Metadata#Required_Phrases|standard metadata field phrases]]. | ||
+ | |||
+ | == Database == | ||
+ | Id fields are stored in the database as | ||
+ | |||
+ | fieldname VARCHAR(255) | ||
+ | |||
+ | == API == | ||
+ | See [[API:EPrints/MetaField/Id|API page]]. | ||
+ | |||
+ | == Examples == | ||
+ | Most basic example. | ||
+ | { | ||
+ | name => 'isbn', | ||
+ | type => 'id', | ||
+ | }, | ||
+ | Use a bespoke value renderer to add links to DOIs where appropriate. | ||
+ | { | ||
+ | name => 'id_number', | ||
+ | type => 'id', | ||
+ | render_value => 'EPrints::Extras::render_possible_doi', | ||
+ | }, |
Latest revision as of 11:59, 16 April 2023
EPrints 3 Reference: Directory Structure - Metadata Fields - Repository Configuration - XML Config Files - XML Export Format - EPrints data structure - Core API - Data Objects
Metadata Fields: Arclanguage - Base64 - Bigint - Boolean - Compound - Counter - Dataobjref - Date - Decimal - Email - Fields - Float - Id - Idci - Image - Int - Itemref - Keywords - Langid - Longtext - Longtext_counter - Multilang - Multipart - Name - Namedset - Pagerange - Recaptcha - Recaptcha3 - Relation - Search - Secret - Set - Storable - Subject - Subobject - Text - Time - Timestamp - Url - Uuid
Contents
Description
This metadata field is very similar to a Text field, the main difference is for search where the whole value is indexed rather than in individual parts. In particular this is useful for things like ISBN or ISSN numbers which contain hyphens (-). For a text field the parts either side of the hyphen would be indexed separately but for a Id field this will be indexed as a single value. Therefore, allowing search to find only those items that match exactly.
Inheritance
Additional Properties
Name | Default Value | Required? | Description | Notes |
---|---|---|---|---|
match | EX | NO | Searches should match string values exactly. | Default from parent default (EQ). This should not be modified in field configuration, as the purpose of Id fields is to match exactly. |
Required Phrases
No additional phrases beyond standard metadata field phrases.
Database
Id fields are stored in the database as
fieldname VARCHAR(255)
API
See API page.
Examples
Most basic example.
{ name => 'isbn', type => 'id', },
Use a bespoke value renderer to add links to DOIs where appropriate.
{ name => 'id_number', type => 'id', render_value => 'EPrints::Extras::render_possible_doi', },