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

Check for filter/exclude fields of an object before deciding if to index or delete #9

Closed
wants to merge 6 commits into from

Conversation

arski
Copy link

@arski arski commented Oct 7, 2013

PR for #8

In particular, I used to have something like qs = self.get_model().objects.filter(foo=1).exclude(related__bar=True) in my model's index's index_queryset method, but this is not being used in queued_search. So this fix makes it possible to define attributes like the following in a model to only index certain objects that pass a filter.

@staticmethod
def queue_filter():
    return {'foo': (1,)}

@staticmethod
def queue_exclude():
    return {'related.bar': (True,)}

@arski
Copy link
Author

arski commented Apr 11, 2016

sad face again

@arski arski closed this Apr 11, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant