Koha 20.05.04.000 w/ ES 5.x.x. Ubuntu 18.04 MariaDB Problem: After running a keyword search, clicking on a genre/form term URL from within opac-detail returns no results on that term, despite having records with the same gf term in the repository. Example: I have 4 bib records in my repository with a genre/form term "Star wars fiction": 1. Keyword search using "index-term-genre:Star wars fiction" returns 4 records. 2. keyword search using phrase "Star wars fiction" with quotes returns 4 records. 3. Subject search using "Star wars fiction" without quotes returns *no results*. 4. Clicking on genre term URL "Star wars fiction" within one of the 4 bib records on opac-detail screen returns *no results*. I was expecting that nos. 3 and 4 above would return 4 records, but doesn't. Is this an Elasticsearch problem, an ES configuration problem, an ES mapping problem, or XSLT problem?
I'm seeing this bug as well in Koha 19.11.08.000. It looks like the search url that is constructed searches the "su" index instead of the "index-term-genre" index. This happens on both the staff-side and the OPAC.
Looks like an XSLT issue: <xsl:when test="$TraceSubjectSubdivisions='1'"> <xsl:attribute name="href">/cgi-bin/koha/opac-search.pl?q=<xsl:call-template name="subfieldSelectSubject"> <xsl:with-param name="codes">avxyz</xsl:with-param> <xsl:with-param name="delimeter"> AND </xsl:with-param> <xsl:with-param name="prefix">(su<xsl:value-of select="$SubjectModifier"/>:<xsl:value-of select="$TracingQuotesLeft"/></xsl:with-param> <xsl:with-param name="suffix"><xsl:value-of select="$TracingQuotesRight"/>)</xsl:with-param> <xsl:with-param name="urlencode">1</xsl:with-param> </xsl:call-template> </xsl:attribute> </xsl:when> <xsl:otherwise> <xsl:attribute name="href">/cgi-bin/koha/opac-search.pl?q=su<xsl:value-of select="$SubjectModifier"/>:<xsl:value-of select="$TracingQuotesLeft"/><xsl:value-of select="str:encode-uri(marc:subfield[@code='a'], true())"/><xsl:value-of select="$TracingQuotesRight"/></xsl:attribute> </xsl:otherwise>
I should clarify, that bit is from MARC21slimOPACdetails for the 655.
Created attachment 113930 [details] [review] Bug 26679: Use index-term-genre for 655 To test: 1 - have a bib with a 655 that is not linked to an authority 2 - confirm link on OPAC and intranet details uses subject index 3 - apply patch, restart, reload pages 4 - confirm links now use index-term-genre and give correct results
Created attachment 119599 [details] [review] Bug 26679: Use index-term-genre for 655 To test: 1 - have a bib with a 655 that is not linked to an authority 2 - confirm link on OPAC and intranet details uses subject index 3 - apply patch, restart, reload pages 4 - confirm links now use index-term-genre and give correct results Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Created attachment 119749 [details] [review] Bug 26679: Use index-term-genre for 655 To test: 1 - have a bib with a 655 that is not linked to an authority 2 - confirm link on OPAC and intranet details uses subject index 3 - apply patch, restart, reload pages 4 - confirm links now use index-term-genre and give correct results Signed-off-by: Owen Leonard <oleonard@myacpl.org> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Looking good, Passing QA
Pushed to master for 21.05, thanks to everybody involved!
Pushed to 20.11.x for 20.11.05
Pushed to 20.05.x for 20.05.11
Not backported to oldoldstable (19.11.x). Feel free to ask if it's needed.