Bug #47129
closed
PI-BASED Indexed Search (v 4.7.7): search.exactCount = 1 doubles the shown results
Added by unkonsorten no-lastname-given over 11 years ago.
Updated almost 7 years ago.
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)
- 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
}
}
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...
Tymoteusz Motylewski wrote:
bug also exists in 6.2
corrected line looks like this, and that fix problem:
$lastResultNumberToAnalyze = ($currentPageNumber + 1) * $this->piVars['results'];
this problem doesn't appear in extbase plugin.
however in pibased plugin it's still present in v7
- Parent task set to #65814
- 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
- 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
Also available in: Atom
PDF