Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

#126 Added PublicationState to index schema #127

Merged
merged 1 commit into from
Mar 22, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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,16 +272,25 @@
<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 -->
<!-- ServerState -->
<xsl:element name="field">
<xsl:attribute name="name">server_state</xsl:attribute>
<xsl:value-of select="/Opus/Opus_Document/@ServerState" />
</xsl:element>

<!-- 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>

<!-- subject (swd) -->
<xsl:for-each select="/Opus/Opus_Document/Subject[@Type = 'swd']">
<xsl:element name="field">
Expand Down
Loading