Django-elasticsearch-dsl-drf filter fields size

There are size options for the Suggester field in django-elasticsearch-dsl-drf . So how do we use the filter extra(size=20) function that we use while writing a query in django-elasticsearch-dsl in django-elasticsearch-dsl-drf view or is there a size option like in the suggestion?

 filter_fields = {
    'stat': {
        'field': 'Stat.raw',
        'lookups': [
            LOOKUP_QUERY_IN,
            LOOKUP_FILTER_RANGE,
        ],
        'default_lookup': LOOKUP_FILTER_WILDCARD,
        'options': {
            'size': Pallets.objects.all().count(),
        },
    },

}
  suggester_fields = {
    'Pallet_Id': {
        'field': 'Pallet_Id.suggest',
        'suggesters': [
            SUGGESTER_COMPLETION,
        ],
        'options': {
            'size': Pallets.objects.all().count(),
        },

    },
Back to Top