google-code-export / djapian

Automatically exported from code.google.com/p/djapian
Other
1 stars 0 forks source link

deleting objects #92

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
it seems deleting objects does not automaticaly delete it in xapian index...
so I have to do it myself with Obj.delete(obj),
is it the normal way ?

Original issue reported on code.google.com by sforne...@gmail.com on 3 Nov 2009 at 1:33

GoogleCodeExporter commented 9 years ago
How do you delete model objects? Via QuerySet delete method?

Original comment by daevaorn on 3 Nov 2009 at 4:40

GoogleCodeExporter commented 9 years ago
via admin interface.

Original comment by sforne...@gmail.com on 3 Nov 2009 at 4:49

GoogleCodeExporter commented 9 years ago
Ok. Have you tried to run `./manager.py index` to update index?

Original comment by daevaorn on 3 Nov 2009 at 9:44

GoogleCodeExporter commented 9 years ago
yes, if I run `./manager.py index` it works.
But I need to update index as soon as I delete object in django admin interface.
So I redefined delete method in my class Obj:
    def delete(self):
        Obj.indexer.delete(self)
        super(Obj,self).delete()
is it a right way to manage djapian indexer ?

Original comment by sforne...@gmail.com on 3 Nov 2009 at 10:15

GoogleCodeExporter commented 9 years ago
If you want immediate result - yes!

Original comment by daevaorn on 4 Nov 2009 at 9:44