Closed Bug 778771 Opened 13 years ago Closed 13 years ago

rework indexing for kb

Categories

(support.mozilla.org :: Search, defect, P2)

defect

Tracking

(Not tracked)

RESOLVED FIXED
2012.16

People

(Reporter: willkg, Assigned: willkg)

References

Details

(Whiteboard: u=dev c=search p=2)

There are a few things that need to be fixed in the Document indexing (apps/wiki/models.py). 1. Fix .index() so that it either indexes or unindexes document. 2. Change .get_indexable() to take a flag allowing us to specify whether this is for a reindexing or not. If it's a reindexing, we actually want to index everything and let .index() determine whether to index or unindex it. 3. Can a revision become the current_revision without triggering a Document post_save hook? Can a document change without triggering a Document post_save hook? 4. Look for other similar edge case issues.
Sticking this in the 2012.15 sprint, bug we could push it off if needed. I think this is a 2 pointer. Items 1 and 2 should be pretty straightforward and that's probably a half day of work. Items 3 and 4 are things to look for and verify--that's probably a half day of work.
Whiteboard: u=dev c=search p=2
Target Milestone: --- → 2012.15
Making this a P2. If we can reindex just the kb, then we can hobble along on that for a while until we have time for other things like this.
Priority: -- → P2
Bumping this to 2012.16 because we're not going to have time in 2012.15 and reindexing will let us hobble along.
Target Milestone: 2012.15 → 2012.16
Assignee: nobody → willkg
Scoobidiver pointed out an issue where he updated a keyword in a document, it got reindexed, but the indexed document doesn't contain the keyword. Caching issue? Not refreshing the index? Race condition?
Pull request: https://github.com/mozilla/kitsune/pull/779 I didn't do exactly what I said should be done in the description because after looking at the code, I think some of those list items aren't useful. This does fix the problem with reindexing redirects. I also tweaked the comments and some other code. I also also changed extract_document to pull from the regular ObjectManager()--maybe the things that Scoobidiver is seeing are caching issues. Hard to tell because I can't reproduce it and I don't see anything in the code that leaps out as a possible issue. Anyhow, all the work required for this bug is done. If there are still issues with the keywords thing, those will be covered in the tracker bug #776014.
Pushed to master just now. I also reindexed the kb so that should deal with any straggling redirects.
Status: NEW → RESOLVED
Closed: 13 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.