Skip to content

Commit

Permalink
Merge pull request #128 from OPUS4/publicationState126-solr7
Browse files Browse the repository at this point in the history
#126 Added PublicationState for PHP 7 (Solr 7.x)
  • Loading branch information
j3nsch authored Mar 22, 2024
2 parents cdc533a + 724d082 commit 4b1bdbe
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 8 deletions.
1 change: 1 addition & 0 deletions conf/schema.xml
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,7 @@
<field name="subject" type="string" indexed="true" stored="false" multiValued="true"/>
<field name="doctype" type="string" indexed="true" stored="false"/>
<field name="server_state" type="string" indexed="true" stored="false" />
<field name="publication_state" type="string" indexed="true" stored="false" />

<!-- Feld für die Sammlung 'institutes', um die Intitute-Facette anzeigen zu können. -->
<field name="institute" type="string" indexed="true" stored="false" multiValued="true"/>
Expand Down
20 changes: 12 additions & 8 deletions src/Solr/Document/solr.xslt
Original file line number Diff line number Diff line change
Expand Up @@ -26,12 +26,7 @@
* along with OPUS; if not, write to the Free Software Foundation, Inc., 51
* Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
* @category Framework
* @package Opus_SolrSearch
* @author Oliver Marahrens <[email protected]>
* @author Sascha Szott <[email protected]>
* @author Jens Schwidder <[email protected]>
* @copyright Copyright (c) 2008-2019, OPUS 4 development team
* @copyright Copyright (c) 2008, OPUS 4 development team
* @license http://www.gnu.org/licenses/gpl.html General Public License
*/
-->
Expand Down Expand Up @@ -277,11 +272,20 @@
<xsl:if test="$doctype != ''">
<xsl:element name="field">
<xsl:attribute name="name">doctype</xsl:attribute>
<xsl:value-of select="/Opus/Opus_Document/@Type" />
<xsl:value-of select="$doctype" />
</xsl:element>
</xsl:if>

<!-- state -->
<!-- PublicationState -->
<xsl:variable name="publicationState" select="/Opus/Opus_Document/@PublicationState" />
<xsl:if test="$publicationState != ''">
<xsl:element name="field">
<xsl:attribute name="name">publication_state</xsl:attribute>
<xsl:value-of select="$publicationState" />
</xsl:element>
</xsl:if>

<!-- ServerState -->
<xsl:element name="field">
<xsl:attribute name="name">server_state</xsl:attribute>
<xsl:value-of select="/Opus/Opus_Document/@ServerState" />
Expand Down

0 comments on commit 4b1bdbe

Please sign in to comment.