Closed etj closed 9 years ago
Hi Emanuele, this is an incidentally re-occurring issue, see for example https://trac.osgeo.org/geonetwork/ticket/326. There are globally 2 ways 2 resolve this (or enlighten me if you see more options):
The first approach seems most appropriate, but it also presents the biggest impact, that's why generally users opt for the second approach.
The first approach is feasible, ideally requires to use org.fao.geonet.kernel.search.TermUriTranslator
in the facet configuration, so the facet values are displayed with the proper text, while filters of the facet use the uri value.
But seem facets in config-summary.xml
, can't use the translator classes, unless I'm missing something.
The current approach for inspiretheme is to index for each referenced theme also a value inspiretheme_en (english translated theme). If you would use that field as a facet (and translate in the UI the english themes to the selected UI language), you would have the desired behaviour. But this approach does not resolve the general keywords from multilingual thesauri issue.
I'm going along these lines:
<xsl:variable name="inspireThemeURI" select="$inspire-theme[skos:prefLabel=$keyword]/@rdf:about"/>
<Field name="inspirethemeuri" string="{$inspireThemeURI}" store="true" index="true"/>
<facets>
<facet name="inspireThemeURI" indexKey="inspirethemeuri" label="inspireThemesURI"/>
...
<summaryType name="hits">
<item facet="inspireThemeURI" sortBy="value" sortOrder="asc" max="35" translator="term:http://geonetwork-opensource.org/inspire-theme"/>
...
In order to get the results:
<inspireThemesURI>
<inspireThemeURI count="10" name="http://rdfdata.eionet.europa.eu/inspirethemes/themes/1" label="Sistemi di coordinate" />
<inspireThemeURI count="24" name="http://rdfdata.eionet.europa.eu/inspirethemes/themes/10" label="Elevazione" />
<inspireThemeURI count="15" name="http://rdfdata.eionet.europa.eu/inspirethemes/themes/11" label="Copertura del suolo" />
but in this way we lose the theme acronym, thus we also lose the css styles.
Probably some less
trick may solve the problem, but the only solution I see at the moment is to duplicate the iti-
css rules to also work with the number in the ending part of the URI.
Any suggestion?
When there are metadata records in multiple languages, the search UI shows different groups for the same theme, one for each language. So for instance, if we have records with theme "Buildings" and some other records with theme "Gebäude", we'll get both labels in the UI.
It is expected that the entries related to a same theme in the different languages should be grouped together, and the theme label should be displayed in the UI current language.