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

[BUG] Number of hits for facets incorrect #1189

Open
BFallert opened this issue Mar 28, 2024 · 1 comment
Open

[BUG] Number of hits for facets incorrect #1189

BFallert opened this issue Mar 28, 2024 · 1 comment
Labels
🐛 bug A non-security related bug.

Comments

@BFallert
Copy link
Collaborator

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

  • OS version: Debian GNU/Linux 11 (bullseye)
  • RDBMS version: MySQL 5.5.5-10.5.23-MariaDB-0+deb11u1
  • Apache Solr version: 8.11.2
  • TYPO3 version: 10.4.38
  • PHP version: 7.4.33
@michaelkubina
Copy link
Collaborator

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 case of a metadata search this relates to the metadata of the toplevel document as well as its underlying structures (chapters, illustrations, etc.).
  • in case of a fulltext search this relates to all fulltext pages, where the search has found results.

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?

@sebastian-meyer sebastian-meyer added the 🐛 bug A non-security related bug. label May 7, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🐛 bug A non-security related bug.
Projects
None yet
Development

No branches or pull requests

3 participants