-
Notifications
You must be signed in to change notification settings - Fork 29
Open
Labels
further-investigationFurther investigation required. Cause or solution unknown yetFurther investigation required. Cause or solution unknown yet
Description
Describe the bug

To Reproduce
- Use the same filter as in screenshot above.
Additional context
The query tries to join the base table again, which should not be the case.
According to @nilmerg, it is a bug in this code below:
icingadb-web/library/Icingadb/Web/Control/SearchBar/ObjectSuggestions.php
Lines 192 to 206 in 24fceca
// This had so many iterations, if it still doesn't work, consider removing it entirely :( | |
if ($searchFilter instanceof Filter\None) { | |
$query->filter($inputFilter); | |
} elseif ($searchFilter instanceof Filter\All) { | |
$searchFilter->add($inputFilter); | |
// There may be columns part of $searchFilter which target the base table. These must be | |
// optimized, otherwise they influence what we'll suggest to the user. (i.e. less) | |
// The $inputFilter on the other hand must not be optimized, which it wouldn't, but since | |
// we force optimization on its parent chain, we have to negate that. | |
$searchFilter->metaData()->set('forceOptimization', true); | |
$inputFilter->metaData()->set('forceOptimization', false); | |
} else { | |
$searchFilter = $inputFilter; | |
} |
Metadata
Metadata
Assignees
Labels
further-investigationFurther investigation required. Cause or solution unknown yetFurther investigation required. Cause or solution unknown yet