Skip to content

Add filters to nested property #125

@isaacjoy

Description

@isaacjoy

Is it possible to add filters to nested SearchFields?

For example: the following SearchField:

class DocumentField(SearchField):
    field_type = 'nested'
    properties = {
        'letters_count': {'type': 'integer'},
    }

Is used in this index:

from .search_fields import DocumentField

class TutorialIndex(indexes.SearchIndex, indexes.Indexable):
    document = DocumentField(stored=True)

but when I search: /search/?document__letters_count__gte=1000 - I get no results when there are definitely documents within the index that have a letter count greater than 1000.

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions