Keywords field: Difference between revisions
Added keywords field |
mNo edit summary |
||
| (7 intermediate revisions by the same user not shown) | |||
| Line 1: | Line 1: | ||
{{fieldtypes}} | {{fieldtypes}} | ||
== Description == | == Description == | ||
Stores a list of keywords as a longtext field but allows searching for exact matches on individual keyword phrases separated by a user-specifiable separator. | Stores a list of keywords as a <tt>longtext</tt> field but allows searching for exact matches on individual keyword phrases separated by a user-specifiable separator. | ||
== | == Inheritance == | ||
* [[Metadata]] | |||
** [[Id field]] | |||
*** [[Keywords field]] | |||
As for [[ | == Additional Properties == | ||
As for [[Id field#Additional_Properties|Id fields]] except for | |||
{| border="1" cellpadding="3" cellspacing="0" | {| border="1" cellpadding="3" cellspacing="0" | ||
| | ! Name !! Default Value !! Required !! Description !! Notes | ||
|- | |||
| '''match''' || <tt>EQ</tt> || NO || How to match against search criteria. || Different from [[Id field]] (<tt>EX</tt>). Could be set to <tt>SET</tt>. | |||
|- | |||
| '''input_rows''' || <tt>10</tt> || NO || How many rows for the field in the input form. || The default value for this property is taken from <tt>cfg.d/field_property_defaults.pl</tt>. | |||
|- | |||
| '''maxlength''' || <tt>65535</tt> || NO || Limit the maximum length of text that can be input. || Different from [[Metadata]] default (<tt>255</tt>). Maximum length could be as much as <tt>4294967295</tt> (over 4 billion). | |||
|- | |- | ||
| ''' | | '''sql_index''' || <tt>0</tt> || NO || Whether field should be index for quicker lookup by the database. || Different from [[Metadata]] default (<tt>1</tt>). | ||
|- | |||
| '''separator''' || <tt>,</tt> || NO || How to separate listed keywords. || | |||
|} | |} | ||
== Required Phrases == | == Required Phrases == | ||
No additional phrases beyond those required for [[Longtext field#Required_Phrases|Longtext fields]]. | |||
== Database == | |||
Keywords fields are stored in the database as | |||
fieldname LONGTEXT | |||
== API == | |||
See [[API:EPrints/MetaField/Keywords|API page]]. | |||
== Examples == | |||
Most basic example. | |||
{ | |||
name => 'keywords', | |||
type => 'keywords', | |||
} | |||
Use a semi-colon (<tt>;</tt>) as a separator. | |||
{ | |||
name => 'terms', | |||
type => 'keywords', | |||
separator => ';', | |||
} | |||
Latest revision as of 15:16, 15 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
Description
Stores a list of keywords as a longtext field but allows searching for exact matches on individual keyword phrases separated by a user-specifiable separator.
Inheritance
Additional Properties
As for Id fields except for
| Name | Default Value | Required | Description | Notes |
|---|---|---|---|---|
| match | EQ | NO | How to match against search criteria. | Different from Id field (EX). Could be set to SET. |
| input_rows | 10 | NO | How many rows for the field in the input form. | The default value for this property is taken from cfg.d/field_property_defaults.pl. |
| maxlength | 65535 | NO | Limit the maximum length of text that can be input. | Different from Metadata default (255). Maximum length could be as much as 4294967295 (over 4 billion). |
| sql_index | 0 | NO | Whether field should be index for quicker lookup by the database. | Different from Metadata default (1). |
| separator | , | NO | How to separate listed keywords. |
Required Phrases
No additional phrases beyond those required for Longtext fields.
Database
Keywords fields are stored in the database as
fieldname LONGTEXT
API
See API page.
Examples
Most basic example.
{
name => 'keywords',
type => 'keywords',
}
Use a semi-colon (;) as a separator.
{
name => 'terms',
type => 'keywords',
separator => ';',
}