Skip to content
Snippets Groups Projects
Commit b8dcb31c authored by Ere Maijala's avatar Ere Maijala Committed by Demian Katz
Browse files

Support multiple building filter values when determining source record...

Support multiple building filter values when determining source record priority with deduplicated records
- makes priority determination work with orFacets.
parent 48ee4a97
No related merge requests found
......@@ -339,17 +339,19 @@ class DeduplicationListener
{
$result = [];
foreach ($params->get('fq') as $fq) {
if (preg_match(
'/\bbuilding:"([^"]+)"/', //'/\bbuilding:"?\d+\/([^\/]+?)\//',
if (preg_match_all(
'/\bbuilding:"([^"]+)"/',
$fq,
$matches
)) {
$value = $matches[1];
if (preg_match('/^\d+\/([^\/]+?)\//', $value, $matches)) {
// Hierarchical facets; take only first level:
$result[] = $matches[1];
} else {
$result[] = $value;
$values = $matches[1];
foreach ($values as $value) {
if (preg_match('/^\d+\/([^\/]+?)\//', $value, $matches)) {
// Hierarchical facets; take only first level:
$result[] = $matches[1];
} else {
$result[] = $value;
}
}
}
}
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment