mirror of
https://github.com/Hopiu/xapian-haystack.git
synced 2026-03-16 22:20:31 +00:00
Added commit argument to remove
This commit is contained in:
parent
a3a3a4e7cf
commit
6756b685f1
1 changed files with 4 additions and 1 deletions
|
|
@ -492,12 +492,15 @@ class XapianSearchBackend(BaseSearchBackend):
|
|||
finally:
|
||||
database.close()
|
||||
|
||||
def remove(self, obj):
|
||||
def remove(self, obj, commit=True):
|
||||
"""
|
||||
Remove indexes for `obj` from the database.
|
||||
|
||||
We delete all instances of `Q<app_name>.<model_name>.<pk>` which
|
||||
should be unique to this object.
|
||||
|
||||
Optional arguments:
|
||||
`commit` -- ignored (present for compatibility with django-haystack 1.4)
|
||||
"""
|
||||
database = self._database(writable=True)
|
||||
database.delete_document(TERM_PREFIXES['id'] + get_identifier(obj))
|
||||
|
|
|
|||
Loading…
Reference in a new issue