Skip to content

Commit 5ab98f6

Browse files
committed
Allow ordering by unmapped fields
Prevent error caused by ordering on empty fields
1 parent 197e905 commit 5ab98f6

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Subscriber/PaginateElasticaQuerySubscriber.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ protected function setSorting(ItemsEvent $event)
6666

6767
// set sort on active query
6868
$event->target->getQuery()->setSort(array(
69-
$sortField => array('order' => $dir),
69+
$sortField => array('order' => $dir, 'ignore_unmapped' => true),
7070
));
7171
}
7272
}

0 commit comments

Comments
 (0)