Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/develop' into develop
Browse files Browse the repository at this point in the history
  • Loading branch information
François Prunayre committed Jun 6, 2014
2 parents 03ab768 + 0a0f6b2 commit e1191e9
Show file tree
Hide file tree
Showing 5 changed files with 34 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -623,7 +623,7 @@ private void computeQuery(ServiceContext srvContext, Element request, ServiceCon
String[] items = summaryItemsEl.getValue().split(",");

for (String item : items) {
if (item.equals("any")) {
if (item.startsWith("any")) {
tmpConfig = _summaryConfig;
break;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,14 @@ GeoNetwork.form.OpenSearchSuggestionTextField = Ext.extend(Ext.form.ComboBox, {
* Default any (ie. full text search).
*/
field: 'any',
/** api: config[suggestionField]
* ``String`` Optional, GeoNetwork Lucene field to use for suggestion.
* If undefined, field is used. That could be useful to restrict the suggestion
* to a subset of values for this field. For example any match any text
* in a metadata record, but suggestion could be limited to title, abstract, keywords
* stored in the anylight field.
*/
suggestionField: '',
/** api: config[fieldName]
* ``String`` Optional, Field name.
*/
Expand Down Expand Up @@ -155,7 +163,7 @@ GeoNetwork.form.OpenSearchSuggestionTextField = Ext.extend(Ext.form.ComboBox, {
url: this.url,
rootId: 1,
baseParams: {
field: this.field,
field: this.suggestionField || this.field,
// withFrequency: true, // To display frequency info
sortBy: this.sortBy
}
Expand Down
1 change: 1 addition & 0 deletions web-client/src/main/resources/apps/search/js/App.js
Original file line number Diff line number Diff line change
Expand Up @@ -336,6 +336,7 @@ GeoNetwork.app = function () {
new GeoNetwork.form.OpenSearchSuggestionTextField({
hideLabel: true,
minChars: 2,
suggestionField: 'anylight',
loadingText: '...',
hideTrigger: true,
url: catalogue.services.opensearchSuggest
Expand Down
1 change: 1 addition & 0 deletions web/src/main/webapp/WEB-INF/config-lucene.xml
Original file line number Diff line number Diff line change
Expand Up @@ -276,6 +276,7 @@
-->
<tokenized>
<Field name="any"/>
<Field name="anylight"/>
<Field name="abstract"/>
<Field name="title"/>
<Field name="altTitle"/>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -139,7 +139,6 @@
<!-- not tokenized title for sorting -->
<Field name="_title" string="{string(.)}" store="false" index="true"/>
</xsl:for-each>

<xsl:for-each select="gmd:alternateTitle/gco:CharacterString">
<Field name="altTitle" string="{string(.)}" store="true" index="true"/>
</xsl:for-each>
Expand Down Expand Up @@ -189,7 +188,7 @@
<xsl:for-each select="gmd:pointOfContact[1]/*/gmd:role/*/@codeListValue">
<Field name="responsiblePartyRole" string="{string(.)}" store="true" index="true"/>
</xsl:for-each>

<!-- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -->

<xsl:for-each select="gmd:abstract/gco:CharacterString">
Expand Down Expand Up @@ -750,7 +749,27 @@
</xsl:for-each>
</xsl:attribute>
</Field>


<xsl:variable name="identification" select="gmd:identificationInfo//gmd:MD_DataIdentification|
gmd:identificationInfo//*[contains(@gco:isoType, 'MD_DataIdentification')]|
gmd:identificationInfo/srv:SV_ServiceIdentification"/>


<Field name="anylight" store="false" index="true">
<xsl:attribute name="string">
<xsl:for-each
select="$identification/gmd:citation/gmd:CI_Citation/gmd:title/gco:CharacterString|
$identification/gmd:citation/gmd:CI_Citation/gmd:alternateTitle/gco:CharacterString|
$identification/gmd:abstract/gco:CharacterString|
$identification/gmd:credit/gco:CharacterString|
$identification//gmd:organisationName/gco:CharacterString|
$identification/gmd:supplementalInformation/gco:CharacterString|
$identification/gmd:descriptiveKeywords/gmd:MD_Keywords/gmd:keyword/gco:CharacterString|
$identification/gmd:descriptiveKeywords/gmd:MD_Keywords/gmd:keyword/gmx:Anchor">
<xsl:value-of select="concat(., ' ')"/>
</xsl:for-each>
</xsl:attribute>
</Field>
<!--<xsl:apply-templates select="." mode="codeList"/>-->

</xsl:template>
Expand Down

0 comments on commit e1191e9

Please sign in to comment.