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
f6372ea3
Commit
f6372ea3
authored
Nov 05, 2020
by
jerome
Browse files
add field for lit/ chg title scraping
parent
bf8f6032
Changes
2
Hide whitespace changes
Inline
Side-by-side
gfl-plugin/src/main/resources/gfl-indexer.xslt
View file @
f6372ea3
...
...
@@ -233,48 +233,24 @@ Refer to comments in the code to understand the used algorithm.
</field>
</xsl:for-each>
<!-- TITLE SHIT -->
<xsl:choose>
<xsl:when
test=
"title/@level = 'm'"
>
<field
name=
"title"
level=
'm'
type =
'main'
>
<xsl:value-of
select=
"title[@type='main']/normalize-space()"
/>
</field>
<field
name=
"title"
level=
'm'
type =
'sub'
>
<xsl:value-of
select=
"title[@type='sub']/normalize-space()"
/>
<xsl:for-each
select=
"title/@level"
>
<field
name =
'title_level'
>
<xsl:value-of
select=
"./normalize-space()"
/>
</field>
</xsl:when>
<xsl:when
test=
"title/@level = 's'"
>
<field
name=
"title"
level=
's'
type =
'main'
>
</xsl:for-each>
<field
name=
"title"
>
<xsl:value-of
select=
"title[@type='main']/normalize-space()"
/>
</field>
<field
name=
"title"
level=
's'
type =
'sub'
>
<xsl:value-of
select=
"title[@type='sub']/normalize-space()"
/>
</field>
</xsl:when>
<xsl:when
test=
"title/@level = 'j'"
>
<field
name=
"title"
level =
"j"
>
<xsl:value-of
select=
"title[@type='main']/normalize-space()"
/>
</field>
<field
name=
"title"
level=
'j'
type =
'sub'
>
<xsl:value-of
select=
"title[@type='sub']/normalize-space()"
/>
</field>
</xsl:when>
<xsl:when
test=
"title/@level = 'a'"
>
<field
name=
"title"
level =
'a'
>
<xsl:value-of
select=
"title[@type='main']/normalize-space()"
/>
</field>
</xsl:when>
<xsl:when
test=
"title/@level = '' and @type='sub'"
>
<field
name=
"title"
level =
'a'
type=
'sub'
>
<xsl:value-of
select=
"title[@type='sub']/normalize-space()"
/>
</field>
</xsl:when>
<xsl:when
test=
"title/@level = 'm' "
>
<field
name=
"title"
level =
'm'
>
<xsl:value-of
select=
"title[@type='main']/normalize-space()"
/>
</field>
</xsl:when>
</xsl:choose>
<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"
>
<field
name=
"biblScope"
>
<xsl:value-of
select=
"./normalize-space()"
/>
</field>
</xsl:for-each>
<xsl:if
test=
"edition!=''"
>
<field
name=
"edition"
>
<xsl:value-of
select=
"edition/normalize-space()"
/>
...
...
@@ -460,7 +436,6 @@ Refer to comments in the code to understand the used algorithm.
<xsl:choose>
<xsl:when
test=
"contains(document-uri(/), 'Lit')"
>
<field
name=
"doctype"
>
literature_meta
</field>
</xsl:when>
<xsl:otherwise>
...
...
solr/gfl/conf/schema.xml
View file @
f6372ea3
...
...
@@ -65,6 +65,8 @@
<!-- for doctype 'literature' -->
<field
name=
"main_title"
type=
"string"
/>
<field
name=
"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"
/>
...
...
@@ -73,7 +75,9 @@
<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"
/>
<!-- for doctype 'page' -->
<field
name=
"article_id"
type=
"string"
/>
...
...
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