Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Goethes Farbenlehre
gfl-importer
Commits
28173e0f
Commit
28173e0f
authored
Nov 06, 2020
by
jerome
Browse files
chg field for every lit type
parent
f6372ea3
Changes
2
Hide whitespace changes
Inline
Side-by-side
gfl-plugin/src/main/resources/gfl-indexer.xslt
View file @
28173e0f
...
...
@@ -232,21 +232,76 @@ Refer to comments in the code to understand the used algorithm.
<xsl:value-of
select=
"./normalize-space()"
/>
</field>
</xsl:for-each>
<!-- TITLE SHIT -->
<xsl:for-each
select=
"title/@level"
>
<field
name =
'title_level'
>
<xsl:value-of
select=
"./normalize-space()"
/>
</field>
<!-- TITLE -->
<xsl:for-each
select=
"title"
>
<xsl:choose>
<xsl:when
test=
"./@type = 'main'"
>
<xsl:choose>
<xsl:when
test=
"./@level = 'a'"
>
<field
name=
"analytic_main_title"
>
<xsl:value-of
select=
"./normalize-space()"
/>
</field>
</xsl:when>
<xsl:when
test=
"./@level = 'm'"
>
<field
name=
"monographic_main_title"
>
<xsl:value-of
select=
"./normalize-space()"
/>
</field>
</xsl:when>
<xsl:when
test=
"./@level = 'j'"
>
<field
name=
"journal_main_title"
>
<xsl:value-of
select=
"./normalize-space()"
/>
</field>
</xsl:when>
<xsl:when
test=
"./@level = 's'"
>
<field
name=
"series_main_title"
>
<xsl:value-of
select=
"./normalize-space()"
/>
</field>
</xsl:when>
<xsl:when
test=
"./@level = 'u'"
>
<field
name=
"unpublished_main_title"
>
<xsl:value-of
select=
"./normalize-space()"
/>
</field>
</xsl:when>
</xsl:choose>
</xsl:when>
<xsl:when
test=
"./@type = 'sub'"
>
<xsl:choose>
<xsl:when
test=
"./@level = 'a'"
>
<field
name=
"analytic_sub_title"
>
<xsl:value-of
select=
"./normalize-space()"
/>
</field>
</xsl:when>
<xsl:when
test=
"./@level = 'm'"
>
<field
name=
"monographic_sub_title"
>
<xsl:value-of
select=
"./normalize-space()"
/>
</field>
</xsl:when>
<xsl:when
test=
"./@level = 'j'"
>
<field
name=
"journal_sub_title"
>
<xsl:value-of
select=
"./normalize-space()"
/>
</field>
</xsl:when>
<xsl:when
test=
"./@level = 's'"
>
<field
name=
"series_sub_title"
>
<xsl:value-of
select=
"./normalize-space()"
/>
</field>
</xsl:when>
<xsl:when
test=
"./@level = 'u'"
>
<field
name=
"unpublished_sub_title"
>
<xsl:value-of
select=
"./normalize-space()"
/>
</field>
</xsl:when>
</xsl:choose>
</xsl:when>
<xsl:otherwise>
<field
name=
"title"
>
<xsl:value-of
select=
"./normalize-space()"
/>
</field>
</xsl:otherwise>
</xsl:choose>
</xsl:for-each>
<field
name=
"title"
>
<xsl:value-of
select=
"title[@type='main']/normalize-space()"
/>
</field>
<xsl:if
test=
"title/@type = 'sub'"
>
<field
name=
"sub_title"
>
<xsl:value-of
select=
"title[@type='sub']/normalize-space()"
/>
</field>
</xsl:if>
<xsl:for-each
select=
"biblScope"
>
<xsl:for-each
select=
"biblScope"
>
<field
name=
"biblScope"
>
<xsl:value-of
select=
"./normalize-space()"
/>
</field>
...
...
@@ -259,20 +314,26 @@ Refer to comments in the code to understand the used algorithm.
<field
name=
"pub_place"
>
<xsl:value-of
select=
"pubPlace/name/normalize-space()"
/>
</field>
<field
name=
"extent"
>
<xsl:value-of
select=
"extent/normalize-space()"
/>
</field>
<field
name=
"publisher"
>
<xsl:value-of
select=
"publisher/normalize-space()"
/>
</field>
<xsl:if
test=
"extent"
>
<field
name=
"extent"
>
<xsl:value-of
select=
"extent/normalize-space()"
/>
</field>
</xsl:if>
<xsl:if
test=
"publisher"
>
<field
name=
"publisher"
>
<xsl:value-of
select=
"publisher/normalize-space()"
/>
</field>
</xsl:if>
<xsl:if
test=
"date/@type='pub'"
>
<field
name=
"pub_date"
>
<xsl:value-of
select=
"date/normalize-space()"
/>
</field>
</xsl:if>
<field
name=
"idno"
>
<xsl:value-of
select=
"idno/normalize-space()"
/>
</field>
<xsl:if
test=
"idno!=''"
>
<field
name=
"idno"
>
<xsl:value-of
select=
"idno/normalize-space()"
/>
</field>
</xsl:if>
</doc>
</xsl:for-each>
</xsl:template>
...
...
solr/gfl/conf/schema.xml
View file @
28173e0f
...
...
@@ -65,8 +65,16 @@
<!-- for doctype 'literature' -->
<field
name=
"main_title"
type=
"string"
/>
<field
name=
"sub_title"
type=
"string"
/>
<field
name=
"analytic_main_title"
type=
"string"
/>
<field
name=
"monographic_main_title"
type=
"string"
/>
<field
name=
"journal_main_title"
type=
"string"
/>
<field
name=
"series_main_title"
type=
"string"
/>
<field
name=
"unpublished_main_title"
type=
"string"
/>
<field
name=
"analytic_sub_title"
type=
"string"
/>
<field
name=
"monographic_sub_title"
type=
"string"
/>
<field
name=
"journal_sub_title"
type=
"string"
/>
<field
name=
"series_sub_title"
type=
"string"
/>
<field
name=
"unpublished_sub_title"
type=
"string"
/>
<field
name=
"uri"
type=
"string"
multiValued=
"true"
/>
<field
name=
"literature_author"
type=
"string"
multiValued=
"true"
/>
<field
name=
"editor"
type=
"string"
multiValued=
"true"
/>
...
...
@@ -75,7 +83,6 @@
<field
name=
"publisher"
type=
"string"
multiValued=
"true"
/>
<field
name=
"pub_date"
type=
"string"
multiValued=
"true"
/>
<field
name=
"idno"
type=
"string"
/>
<field
name=
"title_level"
type=
"string"
multiValued=
"true"
/>
<field
name=
"extent"
type=
"string"
multiValued=
"true"
/>
<field
name=
"biblScope"
type=
"string"
multiValued=
"true"
/>
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment