Project

General

Profile

Actions

Bug #47129

closed

PI-BASED Indexed Search (v 4.7.7): search.exactCount = 1 doubles the shown results

Added by unkonsorten no-lastname-given about 11 years ago. Updated over 6 years ago.

Status:
Closed
Priority:
Should have
Assignee:
-
Category:
Indexed Search
Target version:
-
Start date:
2013-04-11
Due date:
% Done:

0%

Estimated time:
TYPO3 Version:
6.2
PHP Version:
5.3
Tags:
Complexity:
Is Regression:
No
Sprint Focus:

Description

Setting plugin.tx_indexedsearch.search.exactCount = 1 in TS doubles the amount of displayed results (defined by default or in plugin.tx_indexedsearch._DEFAULT_PI_VARS.results).

Result counting works as expected (e.g. "Displaying 1 - 10 of 27"), but 20 results are shown. Pagebrowser works correct (showing results 11 - 30 on second page).

Problem is probalbly caused in pi/class.tx_indexedsearch.php around line 581
if (!$calculateExactCount && $nextResultPosition > $firstResultNumberOnNextPage)


Related issues 1 (0 open1 closed)

Related to TYPO3 Core - Bug #41572: indexed_search: Duplicate search resultsClosed2012-10-04

Actions
Actions #1

Updated by Hans Maulwurf over 10 years ago

  • Assignee set to unkonsorten no-lastname-given

Confirmed for Typo3 6.0.10

For me the following works.:
set

search.exactCount = 0

and add a variable in SearchFormController.php around line 575:

if ($positionInSearchResults > $lastResultNumberOnPreviousPage && $positionInSearchResults <= $lastResultNumberToAnalyze) {
   // Collect results to display
   if (!$stopRows) {                                            //new                     
      $row['result_number'] = $positionInSearchResults;
      $resultRows[] = $row;       
   }
   // This may lead to a problem: If the result
   // check is not stopped here, the search will
   // take longer. However the result counter
   // will not filter out grouped cHashes/pHashes
   // that were not processed yet. You can change
   // this behavior using the "search.exactCount" 
   // property (see above).
   $nextResultPosition = $positionInSearchResults + 1;
   if (!$calculateExactCount && $nextResultPosition > $firstResultNumberOnNextPage) {
      //break;
      $stopRows = true;                                         //new 
   }
}
Actions #2

Updated by Tymoteusz Motylewski about 10 years ago

bug also exists in 6.2

Actions #3

Updated by Christian Reiter about 10 years ago

I can confirm this bug in 6.1.7, also confirmed in 4.7.17

If no one wants to fix it maybe the exactCount option should simply be removed...

Actions #4

Updated by Miroslaw Kmiec almost 10 years ago

Tymoteusz Motylewski wrote:

bug also exists in 6.2

corrected line looks like this, and that fix problem:
$lastResultNumberToAnalyze = ($currentPageNumber + 1) * $this->piVars['results'];

Actions #5

Updated by Tymoteusz Motylewski about 9 years ago

  • Is Regression set to No

this problem doesn't appear in extbase plugin.
however in pibased plugin it's still present in v7

Actions #6

Updated by Daniel Goerz over 8 years ago

  • Parent task set to #65814
Actions #7

Updated by Tymoteusz Motylewski over 7 years ago

  • Subject changed from Indexed Search (v 4.7.7): search.exactCount = 1 doubles the shown results to PI-BASED Indexed Search (v 4.7.7): search.exactCount = 1 doubles the shown results
  • Parent task deleted (#65814)
  • TYPO3 Version changed from 4.7 to 6.2
Actions #8

Updated by Riccardo De Contardi over 6 years ago

  • Status changed from New to Closed
  • Assignee deleted (unkonsorten no-lastname-given)

We feel sorry, but considering that TYPO3 7.6.x is in "priority bugfix" mode (only critical/security issues will be tackled), we close this issue.

If you think that this is the wrong decision please reopen it or open a new issue with a reference to this one

Actions

Also available in: Atom PDF