Skip to content
Snippets Groups Projects
Commit 949e347a authored by Tri Tran's avatar Tri Tran
Browse files

Edited | Using FieldSoft, instead of 'Sort'

parent 68ac04e2
No related branches found
No related tags found
No related merge requests found
......@@ -43,7 +43,7 @@ so that the top matching documents can be aggregated per bucket.
And now the query via DSL:
```php
$sort = new Sort('last_activity_date', Sort::ORDER_DESC);
$sort = new FieldSort('last_activity_date', Sort::DESC);
$sorts = new Sorts();
$sorts->addSort($sort);
$topHitsAggregation = new TopHitsAggregation('top_tag_hits', 1, null, $sorts);
......
......@@ -13,7 +13,7 @@ namespace ONGR\ElasticsearchDSL\SearchEndpoint;
use ONGR\ElasticsearchDSL\BuilderInterface;
use ONGR\ElasticsearchDSL\Sort\AbstractSort;
use ONGR\ElasticsearchDSL\Sort\Sorts;
use ONGR\ElasticsearchDSL\Sort\FieldSort;
use Symfony\Component\Serializer\Normalizer\NormalizerInterface;
/**
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment