From a60bc30a48145c439e2b94a0bf40ee2f20a6a7b6 Mon Sep 17 00:00:00 2001 From: xkyue Date: Mon, 13 Jul 2026 14:50:11 +0100 Subject: [PATCH 1/5] Ensure it is instrument.fullName not instrument.name for ISIS --- .../views/landing/isis/isisInvestigationLanding.component.tsx | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/packages/datagateway-dataview/src/views/landing/isis/isisInvestigationLanding.component.tsx b/packages/datagateway-dataview/src/views/landing/isis/isisInvestigationLanding.component.tsx index c65d1f26d..3b057b7ef 100644 --- a/packages/datagateway-dataview/src/views/landing/isis/isisInvestigationLanding.component.tsx +++ b/packages/datagateway-dataview/src/views/landing/isis/isisInvestigationLanding.component.tsx @@ -293,7 +293,9 @@ const CommonLandingPage = ( icon: , }, { - content: () => data.investigationInstruments?.[0]?.instrument?.name, + content: () => + data.investigationInstruments?.[0]?.instrument?.fullName ?? + data.investigationInstruments?.[0]?.instrument?.name, label: t('investigations.instrument'), icon: , }, From b322ac5990eab2b0164933ba530805f2119cc0e7 Mon Sep 17 00:00:00 2001 From: xkyue Date: Thu, 16 Jul 2026 14:59:31 +0100 Subject: [PATCH 2/5] Changed the instrument name on breadcrumb to instrument full name --- .../src/page/breadcrumbs.component.tsx | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/packages/datagateway-dataview/src/page/breadcrumbs.component.tsx b/packages/datagateway-dataview/src/page/breadcrumbs.component.tsx index 00567410f..569d72ea2 100644 --- a/packages/datagateway-dataview/src/page/breadcrumbs.component.tsx +++ b/packages/datagateway-dataview/src/page/breadcrumbs.component.tsx @@ -71,7 +71,7 @@ const fetchEntityInformation = async ( }) .then((response) => { // Return the property in the data received. - return response.data[entityField]; + return response.data[entityField] ?? response.data['name']; }); return entityName; @@ -116,8 +116,10 @@ const useEntityInformation = ( entity === 'investigation' ? 'title' : entity === 'dataPublication' - ? 'title' - : 'name'; + ? 'title' + : entity === 'instrument' + ? 'fullName' + : 'name'; // this is the field we use to lookup the relevant entity in ICAT - it's usually ID // but for DLS proposals this will be name From f74427ab7f74a1ad716a1461c5c77e47a6eb0e13 Mon Sep 17 00:00:00 2001 From: xkyue Date: Thu, 30 Jul 2026 11:58:53 +0100 Subject: [PATCH 3/5] Use fullName instead of name for the isisDataPublicationLanding page --- .../views/landing/isis/isisDataPublicationLanding.component.tsx | 2 ++ 1 file changed, 2 insertions(+) diff --git a/packages/datagateway-dataview/src/views/landing/isis/isisDataPublicationLanding.component.tsx b/packages/datagateway-dataview/src/views/landing/isis/isisDataPublicationLanding.component.tsx index 4ebab1fb6..d14d473b9 100644 --- a/packages/datagateway-dataview/src/views/landing/isis/isisDataPublicationLanding.component.tsx +++ b/packages/datagateway-dataview/src/views/landing/isis/isisDataPublicationLanding.component.tsx @@ -92,6 +92,8 @@ const LinkedInvestigation = ( const shortInvestigationInfo = [ { content: (entity: DataPublication) => + entity.content?.dataCollectionInvestigations?.[0]?.investigation + ?.investigationInstruments?.[0]?.instrument?.fullName ?? entity.content?.dataCollectionInvestigations?.[0]?.investigation ?.investigationInstruments?.[0]?.instrument?.name, label: t('investigations.instrument'), From 0da08f504ef5d18577f3825c24096b4a27652b00 Mon Sep 17 00:00:00 2001 From: xkyue Date: Tue, 11 Aug 2026 17:19:58 +0100 Subject: [PATCH 4/5] update help text for icat.lucene 4.0.0 --- .../public/res/default.json | 61 +++++++++---- .../search/advancedHelpDialog.component.tsx | 87 ++++++++++--------- 2 files changed, 93 insertions(+), 55 deletions(-) diff --git a/packages/datagateway-search/public/res/default.json b/packages/datagateway-search/public/res/default.json index e035761be..99227156b 100644 --- a/packages/datagateway-search/public/res/default.json +++ b/packages/datagateway-search/public/res/default.json @@ -301,21 +301,53 @@ "show_less": "Show less" }, "advanced_search_help": { - "search_help_label": "See all <2>search options.", + "search_help_label": "See <2>advanced search tips.", "close_button_arialabel": "Close", "title": "Advanced Search Tips", - "description": "Searching the metadata catalogue using one or more words should be intuitive, with the most relevant matches appearing first. However, there is a powerful syntax that supports more advanced use cases, which are described below.", + "description": "Searching the metadata catalogue using one or more words can be achieved by simply typing them into the search bar, the most relevant matches will appear first. However, those with access to large volumes of data will find the powerful syntax described below can enable highly targeted and efficient searches to be created. Many aspects of the search syntax are described below, starting with some common searches examples.", "examples": { "title": "Examples", - "description": "Below are a few examples of common searches and how they can be crafted to execute efficiently for those with access to large volumes of data:", + "description": "Below are some common searches, substitute the example visits, datasets etc with your own:", "examples": [ { - "name": "To search for a visit and partial location", - "value": "+visitId:\"nt20-8\" +location:\"jpegs/pg1/\"" + "name": "To search for a dataset using visit and dataset", + "value": "visitId:\"\" AND name:\"\"" }, { - "name": "To search for a visit, partial location and filename ext", - "value": "+visitId:\"nt20-8\" +location:\" jpegs/pg1/\" +(location:jpeg location:*.jpeg)" + "name": "e.g.", + "value": "visitId:\"nt20-8\" AND name:\"trypsin_10_dnafiles\"" + }, + { + "name":"To search for a dataset using visit and partial dataset", + "value": "visitId:\"\" AND name:" + }, + { + "name": "e.g.", + "value": "visitId:\"nt20-8\" AND name:trypsin_10*" + }, + { + "name": "To search for files using a visit and file type", + "value": "visitId:\"\" AND location.fileName:" + }, + { + "name": "e.g.", + "value": "visitId: \"nt20-8\" AND location.fileName:txt" + }, + { + "name": "To search for files using a visit, partial location and file type", + "value": "visitId:\"\" AND location: \"\" AND location.fileName:" + }, + { + "name": "e.g.", + "value": "visitId: \"nt20-8\" AND location: \"trypsin_10_dnafiles\" AND location.fileName:txt" + }, + { + "name": "To search for a specific files with visit and partial location", + "value": "visitId:\"\" AND location: \"\"" + }, + { + "name": "e.g.", + "value": "visitId: \"nt20-8\" AND location: \"trypsin_10_dnafiles/dna_log.txt\"" } ] }, @@ -359,21 +391,20 @@ }, "special_characters": { "title": "Special characters", - "description": "In addition to whitespace, there are other characters used to split terms based on context. A . character is treated as a separator only when between a mixture of letters and numbers, but is preserved when in-between two letters or two numbers. - is always treated as a separator, and _ is not treated as a separator. Separators cannot be used in the same term as a wildcard, as wildcard queries will not be able to match across terms. For example, a*f will not match abc-def because two comparisons are against abc and def, and neither match.

When building a phrase using quotes, other special characters in the phrase will not perform their special function and instead are treated as white space." + "description": "In addition to whitespace, there are other characters used to split terms based on context. The following applies to all text fields except the location field(s) for a Datafile, which have special handling (see below). A . character is treated as a separator only when between a mixture of letters and numbers, but is preserved when in-between two letters or two numbers. - is always treated as a separator, and _ is not treated as a separator. Separators cannot be used in the same term as a wildcard, as wildcard queries will not be able to match across terms. For example, a*f will not match abc-def because two comparisons are against abc and def, and neither match.

When building a phrase using quotes, other special characters in the phrase will not perform their special function and instead are treated as white space." }, "file_paths": { "title": "File paths", - "description": "The fact that file paths often contain slashes separating directories, dashes within directory names, and dots before extensions can make searching challenging, especially in combination with wildcards. As paths and the intended use case differ, a one size fits all approach is not possible, but there are some techniques that can be used.

When searching for an exact match for full or partial path without wildcards, field targeting (see below) and quoting will give the most efficient query. This will escape all slashes and other separators, but also ensure that you only get results containing all terms, i.e. every directory specified in order. For example, <6>location:\"path/to/directory\".

To use wildcards in combination with other separators, manually replace the latter with whitespace and consider if AND/OR logic should be used, so instead of a??-def, <13>+a?? +def or <17>a?? def would be needed for AND/OR logic respectively.

Finally, when matching file extensions, the approach will differ depending on whether the extension is preceded by a number or a letter. For numbers, to match a name with any extension (or vice versa) the extension/name can be omitted. <25>1234.dat is stored as two terms, 1234 and dat, so one can be matched independently of the other. For letters, wildcards must be used. To match a file named abcd.dat either <29>abcd.* or <33>*.dat can be used, however please note that the latter trailing wildcard can take a long time to evaluate.", + "description": "To allow file paths to be searched, special syntax is applied to three different fields: location, location.fileName and location.exact.

location
For this field, the only separator character is /. This means each subdirectory, and the complete file name, can be matched independently. <6>location:\"path/to/directory\" and <13>location:directory are both valid ways of searching for a single or sequence of directories in the filepath. Wildcards can be used within a single subdirectory, but will not cross into the next child directory. For example path*directory will not match, but dir* will. This field is one of those searched by default if no field is specified.

location.fileName
This field uses the just the file name (whatever follows the final /) and splits it by . to make it easier to search for files with the same root but different extensions <6>location.fileName:run_1234 would match both \"run_1234.txt\" and \"run_1234.nxs\"), or the same extension but different roots <6>location.fileName:txt would match both \"run_1234.txt\" and \"run_5678.txt\"). This field is one of those searched by default if no field is specified.

location.exact
Finally, this field allows exact and hierarchical matches on the absolute file path. All files that start with the search term will be returned, and wildcards can be used to match multiple subdirectories if needed. Unlike the location field, this means an incomplete or relative path cannot be provided. <6>location.exact:/dls/i00/data/202? would match everything at instrument i00 in any folder for the 2020s. Note that to be effective this requires knowledge of the file hierarchy and may lead to poor performance if a lot of results match, so consider combining this with other terms to make a more specific query. This field is NOT searched by default if no field is specified.", "link1": "?searchText=location%3A\"path%2Fto%2Fdirectory\"", - "link2": "?searchText=%2Ba%3F%3F+%2Bdef", - "link3": "?searchText=a%3F%3F+def", - "link4": "?searchText=1234.dat", - "link5": "?searchText=abcd.%3F*", - "link6": "?searchText=*.dat" + "link2": "?searchText=location%3Adirectory", + "link3": "?searchText=location.filename%3Arun_1234", + "link4": "?searchText=location.filename%3Atxt", + "link5": "?searchText=location.exact%3A%2Fdls%2Fi00%2Fdata%2F202%3F" }, "fields": { "title": "Fields", - "description": "By default, terms are applied to several fields of the metadata. However more specific searches are possible based on the list of supported fields below (note that not all fields will always have a value and the fields differ between entities). For example, to find results that mention calibration in their summary but not their title, search for <16>summary:calibration -title:calibration

Investigation<22><0>title<1>summary<2>name<3>type.name<4>visitId<5>facility.name<6>doi Dataset<24><0>name<1>description<2>type.name<3>visitId<4>sample.name<5>sample.type.name<6>doi Datafile<26><0>name<1>description<2>location<3>datafileFormat.name<4>visitId<5>sample.name<6>sample.type.name<7>doi ", + "description":"By default, terms are applied to several fields of the metadata. However more specific searches are possible based on the list of supported fields below (note that not all fields will always have a value and the fields differ between entities). For example, to find results that mention calibration in their summary but not their title, search for <16>summary:calibration -title:calibration

Visit<22><0>title<1>summary<2>name<3>type.name<4>visitId<5>sample.name<6>sample.type.nameDataset<24><0>name<1>description<2>type.name<3>visitIdDatafile<26><0>name<1>description<2>visitId<3>location<4>location.fileName<5>location.exact", "link1": "?searchText=summary%3Acalibration+-title%3Acalibration" }, "footer": "Further information on searching can be found <2>here." diff --git a/packages/datagateway-search/src/search/advancedHelpDialog.component.tsx b/packages/datagateway-search/src/search/advancedHelpDialog.component.tsx index 3147eeb17..113e24d9f 100644 --- a/packages/datagateway-search/src/search/advancedHelpDialog.component.tsx +++ b/packages/datagateway-search/src/search/advancedHelpDialog.component.tsx @@ -418,77 +418,84 @@ const AdvancedHelpDialog = (): React.ReactElement => { t={t} i18nKey="advanced_search_help.file_paths.description" > - The fact that file paths often contain slashes separating - directories, dashes within directory names, and dots before - extensions can make searching challenging, especially in - combination with wildcards. As paths and the intended use case - differ, a one size fits all approach is not possible, but there - are some techniques that can be used. + To allow file paths to be searched, special syntax is applied to + three different fields: location, location.fileName and + location.exact.

- When searching for an exact match for full or partial path - without wildcards, field targeting (see below) and quoting will - give the most efficient query. This will escape all slashes and - other separators, but also ensure that you only get results - containing all terms, i.e. every directory specified in order. - For example,{' '} + location +
+ For this field, the only separator character is{' '} + /. This means each subdirectory, and the + complete file name, can be matched independently.{' '} location:"path/to/directory" - - .

To use wildcards in combination with other - separators, manually replace the latter with whitespace and - consider if AND/OR logic should be used, so instead of a??-def,{' '} + {' '} + and{' '} - +a?? +def + location:directory {' '} - or{' '} + and are both valid ways of searching for a single or sequence of + directories in the filepath. Wildcards can be used within a + single subdirectory, but will not cross into the next child + directory. For example path*directory will not + match, but dir* will. This field is one of + those searched by default if no field is specified. +

+ location.fileName +
+ This field uses the just the file name (whatever follows the + final /) and splits it by . to make it easier + to search for files with the same root but different extensions + ( - a?? def + location.fileName:txt {' '} - would be needed for AND/OR logic respectively. -

Finally, when matching file extensions, the - approach will differ depending on whether the extension is - preceded by a number or a letter. For numbers, to match a name - with any extension (or vice versa) the extension/name can be - omitted.{' '} + would match both "run_5678.txt" and + "run_1234.nxs"), or the same extension but different + roots ( - 1234.dat + location.fileName:txt {' '} - is stored as two terms, 1234 and dat, so one can be matched - independently of the other. For letters, wildcards must be used. - To match a file named abcd.dat either{' '} + would match both "run_1234.txt" and + "run_5678.txt"). This field is one of those searched + by default if no field is specified. +

+ location.exact +
+ Finally, this field allows exact and hierarchical matches on the + absolute file path. All files that start with the search term + will be returned, and wildcards can be used to match multiple + subdirectories if needed. Unlike the location field, this means + an incomplete or relative path cannot be provided.{' '} - abcd.* - {' '} - or{' '} - - *.dat + location.exact:/dls/i00/data/202? {' '} - can be used, however please note that the latter, trailing - wildcard can take a long time to evaluate. + would match everything st instrument i00 in any folder for the + 2020s. Note that to be effective this requires knowledge of the + file heirachy and may lead to poor performance if a lot of + results match, so consider combining this with other terms to + make a more specific query. This field is NOT searched by + default if no field is specified. From 1a5c08130161cca2a419cc1c2b1f9c8e53014172 Mon Sep 17 00:00:00 2001 From: xkyue Date: Wed, 12 Aug 2026 10:38:49 +0100 Subject: [PATCH 5/5] edit test due to change in name of advance search tip button --- .../datagateway-search/cypress/e2e/searchBoxContainer.cy.ts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/packages/datagateway-search/cypress/e2e/searchBoxContainer.cy.ts b/packages/datagateway-search/cypress/e2e/searchBoxContainer.cy.ts index 800ebc6d6..caf8e0fcb 100644 --- a/packages/datagateway-search/cypress/e2e/searchBoxContainer.cy.ts +++ b/packages/datagateway-search/cypress/e2e/searchBoxContainer.cy.ts @@ -18,7 +18,7 @@ describe('SearchBoxContainer Component', () => { cy.get('#search-entities-menu').should('exist'); cy.get('[aria-label="Submit search"]').should('exist'); - cy.findByRole('button', { name: 'search options' }).should('exist'); + cy.findByRole('button', { name: 'advanced search tips' }).should('exist'); cy.get('#search-entities-menu').click(); cy.get('[aria-label="Investigation checkbox"]').should('exist'); @@ -79,7 +79,7 @@ describe('SearchBoxContainer Component', () => { }); it('should display advanced help dialog when advanced button is clicked', () => { - cy.findByRole('button', { name: 'search options' }).click(); + cy.findByRole('button', { name: 'advanced search tips' }).click(); cy.get('[aria-labelledby="advanced-search-dialog-title"') .contains('Advanced Search Tips') @@ -92,7 +92,7 @@ describe('SearchBoxContainer Component', () => { ); //Should be able to click on one of the links - cy.findByRole('button', { name: 'search options' }).click(); + cy.findByRole('button', { name: 'advanced search tips' }).click(); cy.get('[aria-labelledby="advanced-search-dialog-title"').contains( 'Advanced Search Tips'