diff --git a/doc/release-notes/11147-string-field-type.md b/doc/release-notes/11147-string-field-type.md new file mode 100644 index 00000000000..4ce0fffa231 --- /dev/null +++ b/doc/release-notes/11147-string-field-type.md @@ -0,0 +1,5 @@ +The "string" type has been added as a new field type for metadata fields. + +In contrast to "text" fields, "string" fields are stored and indexed exactly as provided, without any text analysis or transformations. + +This field type is suitable for fields like IDs (e.g. ORCIDs) or enums, where exact matches are required when searching. \ No newline at end of file diff --git a/doc/sphinx-guides/source/admin/metadatacustomization.rst b/doc/sphinx-guides/source/admin/metadatacustomization.rst index df07b65153b..2285cc7df81 100644 --- a/doc/sphinx-guides/source/admin/metadatacustomization.rst +++ b/doc/sphinx-guides/source/admin/metadatacustomization.rst @@ -144,6 +144,7 @@ Each of the three main sections own sets of properties: | | | | \• email | | | | | \• text | | | | | \• textbox | +| | | | \• string | | | | | \• url | | | | | \• int | | | | | \• float | @@ -315,6 +316,12 @@ FieldType definitions | | section of the Dataset + File | | | Management page in the User Guide. | +---------------+------------------------------------+ +| string | Any text may be entered into this | +| | field. The value is stored and | +| | indexed exactly as provided, | +| | without any text analysis or | +| | transformations. | ++---------------+------------------------------------+ | url | If not empty, field must contain | | | a valid URL. | +---------------+------------------------------------+ diff --git a/src/main/java/edu/harvard/iq/dataverse/DatasetFieldType.java b/src/main/java/edu/harvard/iq/dataverse/DatasetFieldType.java index 32a23e06761..0191b178795 100644 --- a/src/main/java/edu/harvard/iq/dataverse/DatasetFieldType.java +++ b/src/main/java/edu/harvard/iq/dataverse/DatasetFieldType.java @@ -36,8 +36,8 @@ public class DatasetFieldType implements Serializable, Comparable