Update the index for a single object. Attached to the class's post-save hook. If ``using`` is provided, it specifies which connection should be used. Default relies on the routers to decide which backend should be used.
(self, instance, using=None, **kwargs)
| 308 | backend.update(self, self.index_queryset(using=using)) |
| 309 | |
| 310 | def update_object(self, instance, using=None, **kwargs): |
| 311 | """ |
| 312 | Update the index for a single object. Attached to the class's |
| 313 | post-save hook. |
| 314 | |
| 315 | If ``using`` is provided, it specifies which connection should be |
| 316 | used. Default relies on the routers to decide which backend should |
| 317 | be used. |
| 318 | """ |
| 319 | # Check to make sure we want to index this first. |
| 320 | if self.should_update(instance, **kwargs): |
| 321 | backend = self.get_backend(using) |
| 322 | |
| 323 | if backend is not None: |
| 324 | backend.update(self, [instance]) |
| 325 | |
| 326 | def remove_object(self, instance, using=None, **kwargs): |
| 327 | """ |
no test coverage detected