kitodo / kitodo-presentation

Kitodo.Presentation is a feature-rich framework for building a METS- or IIIF-based digital library. It is part of the Kitodo Digital Library Suite.
https://kitodo.org
GNU General Public License v3.0
38 stars 45 forks source link

[BUG] Number of hits for facets incorrect #1189

Open BFallert opened 5 months ago

BFallert commented 5 months ago

Number of hits for facets incorrect

In the facets contained on the page, an incorrect number is displayed for the number of hits in almost all cases.

If the respective link is clicked, the number of hits corresponds to a separate Solr enquiry.

As far as could be determined by debugging, the numbers returned by the following lines are not correct:

// check for solr response
$solrRequest = $solr->service->createRequest($selectQuery);
$response = $solr->service->executeRequest($solrRequest);

contained in Classes/Controler/SearchControler.php

Reproduction

Steps to reproduce the behaviour:

  1. Call up any collection
  2. In the facets contained on the page, an incorrect number is displayed for the number of hits in almost all cases.

Expected Behavior

The number of hits displayed after a facet should correspond to the number of Solr queries.

Screenshots and Examples

Example of facets

image

Difference between number of hits for facets and results page when clicking on the facet link

image

Environment

michaelkubina commented 5 months ago

It seems there is a misunderstanding about these numbers.

The circled number means the number of documents (the toplvel documents). The number in the facets on the other hand means how many hits have been found in these documents:

In the template partial: Resources/Private/Partials/ListView/SearchHits.html this gets resolved to Die Suche ergab %d Treffer in %d Dokumenten.

I dont know, why you cant see this information. The template for the listview Resources/Private/Templates/ListView/Main.html should render this partial via <f:render partial="ListView/SearchHits" arguments="{_all}" />.

Have you altered the template / commented out this section maybe?