Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add filters to nested property #125

Open
isaacjoy opened this issue Apr 17, 2018 · 1 comment
Open

Add filters to nested property #125

isaacjoy opened this issue Apr 17, 2018 · 1 comment

Comments

@isaacjoy
Copy link

isaacjoy commented Apr 17, 2018

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.

@rhblind
Copy link
Owner

rhblind commented Jun 16, 2018

Hey, I'm afraid that's not possible at the moment.
I don't really see that I'll have time implementing this in the near future as I have very limited time working on this library these days.
However I'm always willing to accept PRs with new functionality :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants