我正在对查询集应用不同
matches = queryset.filter(name__contains=query).distinct('entity_id')
我也不会申请order_by('-count')
,即
matches=queryset.filter(name__contains=query).order_by('count').distinct('entity_id')
但出现错误
ProgrammingError at /v1/search/
SELECT DISTINCT ON expressions must match initial ORDER BY expressions
LINE 1: SELECT DISTINCT ON ("entity"."entity_id") "entity...
如何做到这一点。