django-haystack / django-haystack/celery-haystack
When the signal is triggered, the index_queryset is ignored
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 226
- Forks
- 95
- PR merge metrics
- No merged PRs in 30d
Description
Lets say there is a CelerySearchIndex that specifies a reduced index_queryset. Then, the update/delete signal will be called for ANY instance of that model, not restricted to the specified index_queryset. So, when get_instance is called, if the model instance is not included in its manager's default queryset, celery haystack can't find it triggering two errors:
Task celery_haystack.tasks.CeleryHaystackSignalHandler[bff705bb-68fc-4f26-854b-bfde98024014]raised exception: ValueError(u"Couldn't load object '... you model instance...'",) And Couldn't load ... you model instance... Somehow it went missing?
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by tracing the signal handler, index_queryset, and get_instance behavior described in the issue. Reproduce an update or delete for a model instance outside a reduced index_queryset, then verify that the signal no longer raises the reported errors and only processes eligible instances.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- django, python
- Domain
- backend, search
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100