Opened 15 years ago
Last modified 20 months ago
#429 new enhancement
Document should perhaps track changes directly
Reported by: | Olly Betts | Owned by: | Olly Betts |
---|---|---|---|
Priority: | normal | Milestone: | 2.0.0 |
Component: | Backend-Glass | Version: | git master |
Severity: | normal | Keywords: | |
Cc: | Blocked By: | ||
Blocking: | #302 | Operating System: | All |
Description
Follow on from #250.
I wonder if a Document object should track the changes made, rather than copy the old data and modify it. Currently adding a new term to a document is unnecessarily O(number of terms indexing that document). The current optimisation is still useful in the case of reindexing an unmodified (or slightly modified) document from the original source.
Allowing iteration of the modified data is awkward - either we need specialised iterator subclasses to handle this, or we flatten the changes onto the old data to give the current representation when asked to iterate.
Marking for 1.2.x as this probably doesn't require ABI or API changes.
Change History (6)
comment:1 by , 13 years ago
Milestone: | 1.2.x → 1.3.x |
---|
comment:2 by , 10 years ago
Component: | Backend-Brass → Backend-Glass |
---|
comment:3 by , 9 years ago
Milestone: | 1.3.x → 1.4.x |
---|
comment:4 by , 6 years ago
The "adding a single term" case will need to rewrite the termlist table entry, which I think means this is inevitably O(number of terms indexing that document) (at least until we support replace_document()
on termlist-less databases).
It may still be significantly faster despite that unchanged O() though.
comment:5 by , 2 years ago
Blocking: | 302 added |
---|
comment:6 by , 20 months ago
Milestone: | 1.4.x → 2.0.0 |
---|---|
Version: | SVN trunk → git master |
Not a blocker for 1.4.0.