Skip to content

Commit

Permalink
Update help text with new features etc. #1363
Browse files Browse the repository at this point in the history
  • Loading branch information
patrick-austin authored and kennethnym committed Feb 2, 2023
1 parent 019d796 commit b7e973b
Show file tree
Hide file tree
Showing 2 changed files with 279 additions and 60 deletions.
55 changes: 40 additions & 15 deletions packages/datagateway-search/public/res/default.json
Original file line number Diff line number Diff line change
Expand Up @@ -323,29 +323,54 @@
"search_options_arialabel": "Search options",
"close_button_arialabel": "Close",
"title": "Advanced Search Tips",
"description": "When you search for a word e.g. 'calibration', we will search for any records containing this word. But, sometimes you may wish to be more specific. Here we show you how.",
"exact_phrase": {
"title": "Search by an exact phrase",
"description": "Use quotation marks around a phrase to search for a precise sequence of words e.g. <2>\"neutron scattering\"<2>.",
"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.",
"terms": {
"title": "Terms",
"description": "By default, all words in the search text are treated as separate <strong>terms</strong>. Results must contain at least one <strong>term</strong> to be returned, and they can occur in any order in the result. When using the default relevancy based sorting, results containing the most <strong>terms</strong> will appear first. For example, <10>neutron scattering</10> will return results containing both <strong>terms</strong> first, then results containing only one or the other.",
"link1": "?searchText=neutron+scattering"
},
"phrases": {
"title": "Phrases",
"description": "Use quotation marks around a multiple <strong>terms</strong> to create a <strong>phrase</strong>. Results must contain the entire <strong>phrase</strong>, with the words in order. For example, <7>\"neutron scattering\"</7>.",
"link1": "?searchText=\"neutron+scattering\""
},
"logic_operators": {
"title": "Using logic operators",
"description": "Find all data containing 'neutron' and 'scattering' with <1>'neutron <strong>AND</strong> scattering'</1>.<br><br>Find all data containing either neutron or scattering with '<4>neutron <strong>OR</strong> scattering</4>'.<br><br>Find all data that contains the phrase 'scattering' but exclude those containing 'elastic' with '<7>scattering <strong>NOT</strong> elastic</7>'.<br><br>Use brackets around phrases to construct more complicated searches e.g. '<10>scattering <strong>NOT</strong> (elastic <strong>OR</strong> neutron)</10>'.",
"link1": "?searchText=neutron+AND+scattering",
"link2": "?searchText=neutron+OR+scattering",
"link3": "?searchText=scattering+NOT+elastic",
"link4": "?searchText=scattering+NOT+%28elastic+OR+neutron%29"
"title": "Logic operators",
"description": "<strong>OR</strong> is the default behaviour for multiple <strong>terms</strong>: <6>neutron OR scattering</6> is equivalent to <10>neutron scattering</10>. <br/> <br/> <strong>AND</strong> requires both <strong>terms</strong> on either side of the keyword must be present in the result: <22>neutron AND scattering</22>. <br/> <br/> <strong>+</strong> requires the next <strong>term</strong> be present in the result: <34>+neutron +scattering</34>. <br/> <br/> <strong>NOT</strong> or <strong>-</strong> requires the next <strong>term</strong> not be present in the result: <48>-neutron NOT scattering</48>.<br/> <br/> Finally, brackets can be used to build complicated logic: <55>(+neutron -photon) AND (scattering OR diffraction)</55>.",
"link1": "?searchText=neutron+OR+scattering",
"link2": "?searchText=neutron+scattering",
"link3": "?searchText=scattering+AND+elastic",
"link4": "?searchText=%2Bneutron+%2Bscattering",
"link5": "?searchText=-neutron+NOT+scattering",
"link6": "?searchText=(%2Bneutron+-photon)+AND+(scattering+OR+diffraction)"
},
"synonyms": {
"title": "Synonyms",
"description": "Results do not need to have the exact <strong>term</strong> searched for in order to match. If the root word is the same, then the results should appear. <5>Scattering</5>, <8>scattered</8>, <11>scatters</11> etc. are all treated as if the user searched for <15>scatter</15>. Additionally, some common scientific terminology has additional support. Chemical symbols, amino acid codes and the PaNET ontology of techniques are all supported, so that searching for <18>xas li</18> is equivalent to searching for <22>x-ray absorption spectoscopy lithium</22>.",
"link1": "?searchText=Scattering",
"link2": "?searchText=scattered",
"link3": "?searchText=scatters",
"link4": "?searchText=scatter",
"link5": "?searchText=xas+li",
"link6": "?searchText=x-ray+absorption+spectoscopy+lithium"
},
"wildcards": {
"title": "Using wildcards",
"description": "Use wildcards to take the place of one or more characters in a phrase.<br><br>A question mark '?' can be used to search for a phrase with one or more character missing e.g. '<2>te?t</2>' will return results containing 'test' or 'text'.<br><br>An asterix '*' can be used to replace zero or more characters e.g. '<4>*ium</4>' will return results containing words like 'sodium' and 'vanadium'.",
"description": "To take the place of one character, use <strong>?</strong>. To represent any number (0 or more) characters, use <strong>*</strong>. For example, <7>te?t</7> would return results containing test or text, and <11>te*t</11> would also return testament.<br/> <br/> Note that the use of wildcards can prevent the synonym functionality described above. <19>scatterin?</19> will not result in matches, as we match against the root word which is scatter. <23>scatter*</23> however would work. Furthermore, use of wildcards (especially leading wildcards) can take longer than an otherwise identical search, so they should be used sparingly.",
"link1": "?searchText=te%3Ft",
"link2": "?searchText=*ium"
"link2": "?searchText=te*t",
"link3": "?searchText=scatterin%3F",
"link4": "?searchText=scatter*"
},
"limited_search_results": {
"title": "Limited results",
"description": "Due to technical and performance reasons, only the top {{maxNumResults}} results will be displayed for each entity type i.e. Investigation, Dataset or Datafile. If you find your search gives {{maxNumResults}} results, try using a more specific query to find what you are looking for."
"special_characters": {
"title": "Using wildcards",
"description": "In addition to whitespace, there are other characters used to split <strong>terms</strong> based on context. A <strong>.</strong> 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. <strong>-</strong> is always treated as a separator. This can make searching for file extension difficult, as a searching for <9>1234.dat</9> will match any result containing the <strong>term</strong> 1234 or dat, but not for example abcd.dat as that is treated as one single <strong>term</strong>.<br/> <br/> When building a <strong>phrase</strong>, special characters in the <strong>phrase</strong> will not perform their special function and instead are treated as white space. This can be a useful way of effectively ignoring slashes in a file path, but will also prevent wildcards from working.",
"link1": "?searchText=1234.dat"
},
"fields": {
"title": "Using wildcards",
"description": "By default, <strong>terms</strong> are applied to several <strong>fields</strong> of the metadata. However more specific searches are possible based on the list of supported <strong>fields</strong> below (note that not all <strong>fields</strong> will always have a value and the <strong>fields</strong> 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</16><br/> <br/> <strong>Investigation</strong><22><0>title</0><1>summary</1><2>name</2><3>type.name</3><4>visitId</4><5>facility.name</5><6>doi </6></22><strong>Dataset</strong><24><0>name</0><1>description</1><2>type.name</2><3>visitId</3><4>sample.name</4><5>sample.type.name</5><6>doi </6></24><strong>Datafile</strong><26><0>name</0><1>description</1><2>location</2><3>datafileFormat.name</3><4>visitId</4><5>sample.name</5><6>sample.type.name</6><7>doi </7></26>",
"link1": "?searchText=summary%3Acalibration+-title%3Acalibration"
},
"footer": "Further information on searching can be found <2>here</2>."
}
Expand Down
Loading

0 comments on commit b7e973b

Please sign in to comment.