geonetwork / core-geonetwork

GeoNetwork is a catalog application to manage spatially referenced resources. It provides powerful metadata editing and search functions as well as an interactive web map viewer. It is currently used in numerous Spatial Data Infrastructure initiatives across the world.
http://geonetwork-opensource.org/
GNU General Public License v2.0
426 stars 489 forks source link

Metadata with failed indexation not shown properly #7051

Open Fonaine opened 1 year ago

Fonaine commented 1 year ago

Some metadata are not properly indexed due to incorrect metadata xml content For example, this part is invalid since codeListValue shoud be "theme"


<gmd:descriptiveKeywords>
            <gmd:MD_Keywords>
               <gmd:keyword>
                  <gco:CharacterString>recherche</gco:CharacterString>
               </gmd:keyword>
               <gmd:type>
                  <gmd:MD_KeywordTypeCode codeList="http://standards.iso.org/iso/19139/resources/gmxCodelists.xml#MD_KeywordTypeCode"
                                          codeListValue="GEMET - Concepts, version 2.4 "
                                          codeSpace="ISOTC211/19115"/>
               </gmd:type>
            </gmd:MD_Keywords>
         </gmd:descriptiveKeywords>

The behavior is strange :

  1. the metadata is in results but most of the fields are not shown (title, abstract)
  2. in default view, most of the fields are not shown
  3. in complete view, all fields are OK

Is it a bug ? In geonetwork 4, a lot of harvested metdadata have this kind of problem due to invalid contents, it will be difficult to fix this contents at source. Thanks to your advices.

To Reproduce Steps to reproduce the behavior:

  1. insert this tag in XML ` recherche `
  2. save the metadata
  3. find it in search

Screenshots image image complete view: image

Additional context reproduced in v4.0 and v4.2.1

fxprunayre commented 1 year ago

@Fonaine if you can try https://github.com/geonetwork/core-geonetwork/pull/7052 and report if that works for you then this fix can be embedded in next release next week. Merci.