Closed Bug 776014 Opened 12 years ago Closed 12 years ago

[tracker] No relevant KB search results for recently localized articles

Categories

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

defect

Tracking

(Not tracked)

RESOLVED FIXED
2012Q3

People

(Reporter: scoobidiver, Assigned: willkg)

References

Details

I looked for document with id=10635 (which is https://support.mozilla.org/fr/kb/utiliser-marque-pages-scriptes) in the search index and it doesn't seem to be there.

This needs some investigation. I think we should at least figure out what the issue is and how severe it is during this sprint.
Priority: -- → P1
Whiteboard: u=user c=search p=
Target Milestone: --- → 2012.14
Grabbing this one to look into today.
Assignee: nobody → willkg
Priority: P1 → --
Target Milestone: 2012.14 → ---
RRRRR... stupid bugzilla.
Priority: -- → P1
Target Milestone: --- → 2012.14
Thanks for the quick action. I agree this is something we should focus on. Let me know what you need from me.
I reindexed production and that made the symptoms go away. Namely, doing a search for "FAQ Firefox Android" shows that item at the top.

We have had some flakiness with ES lately, but we should have gotten server email for failures and we didn't, so it's possible that it's a code problem.

On Monday, I'll investigate more. I'll start by trying to write a test to reproduce the issue.
I can't reproduce the problem locally--it seems to be working fine.

1. go to the FAQ for Firefox Android document in the French locale
2. edit the latest revision and add snarky remarks about freedom fries
3. save the revision
4. approve the revision

Watching my logs locally, I see an indexing task get created and I see celery handling it thus reindexing the document. I check the index and the edits I made are there.

So given that, there are two possibilities:

1. my steps to reproduce are somehow wrong and there's something missing that's triggering a funky edge-case scenario where things don't work right (I think this is unlikely)

2. maybe this got caught in some ES funky scenario but for some reason it never errored out in a way that sent us an email so we never found out about it (this is too vague to have a confidence about)


I think what I want to do is write an admin page that shows me the last day of approved revisions in the wiki and the last day of wiki documents that were updated in the index. Then I'll keep an eye on that and see if there are discrepancies.

One possible (but mildly terrible solution) is that we create a cron job that reindexes the last day of wiki updates. Then if live indexing fails for some reason, this would catch it. We could do similar things for support forums and contributor forums, too. I'd like to not do that, though, since it's potentially blindly patching a bad system and it'll make it hard to track down the problems in the future.

Anyhow, I'll continue looking at this on Monday.
Landed the admin page I need to look at things in master in https://github.com/mozilla/kitsune/commit/578db53e444260a44dbe653579dc4c3bc12bc0ba

It'll go out to production soon, then I'll spend the rest of the week looking at things.
We pushed out the admin page yesterday. I didn't get a chance to look at it until this morning.

Two things jump out at me:

1. we're indexing kb templates and probably shouldn't be
2. it looks like 1 in 10 kb documents that get updated aren't then reindexed

1 in 10 sucks--that's a big problem. I'll keep looking into it.
Hey Will. Good catch! Thanks for the extra effort on this. Looping in Verdi just so he is aware.
All changes I made yesterday are not taken into account. I doubt only 10% is affected.
I renamed permissions into autorisations in the the title of https://support.mozilla.org/fr/kb/comment-firefox-android-utilise-autorisations and in the content of https://support.mozilla.org/fr/kb/faq-firefox-android
When I search autorisation in the mobile product, I get the old article name and I don't get the FAQ article.
(In reply to Will Kahn-Greene [:willkg] from comment #8)
> 1. we're indexing kb templates and probably shouldn't be
Templates are included in articles so they must be indexed.
(In reply to Scoobidiver from comment #11)
> (In reply to Will Kahn-Greene [:willkg] from comment #8)
> > 1. we're indexing kb templates and probably shouldn't be
> Templates are included in articles so they must be indexed.

We need to index templates because you can explicitly search them from Advanced Search.
Converting this to a tracker and taking it out of the sprints. I'm fairly sure there are multiple tiny problems here. We'll write up a new bug for each one.
Depends on: 778753
Summary: No relevant KB search results for recently localized articles → [tracker] No relevant KB search results for recently localized articles
Whiteboard: u=user c=search p=
Target Milestone: 2012.14 → 2012Q3
No longer depends on: 778753
AMO was moved to their own ES cluster some time last week.

I've been watching the trouble-shooting page that I wrote and we haven't had any issues since Sunday. Having said that, I'm fairly sure we have an issue with things not getting updated in the index when a document turns into a redirect. That's bug #778771. I've got that in my queue to fix this sprint.

I'll keep watching the troubleshooting page for the rest of the week.

Scoobidiver: If you see any additional issues, comment in this bug.
Depends on: 778771
There are no articles to localized in French but I added incredimail as keyword in two articles today and they don't show up in search results.
(In reply to Scoobidiver from comment #15)
> There are no articles to localized in French but I added incredimail as
> keyword in two articles today and they don't show up in search results.

Can you be specific and list the urls for the articles?
Looks like that first one got reindexed right after it was saved, but it doesn't have the keyword you added.

The second one was changed/indexed yesterday, so I can't look into it with the tools I have.

I'll add a note to the kb reindexing bug to look at the reindexing code and see if there's a race condition or if it's pulling from cache or something.
Scoobidiver: Has the revision for that first article been approved? Doesn't "En course" mean "in progress"? The reason I ask is that if it hasn't been approved, it won't be updated in the index.
"En cours" means also Current.

Off-topic: Current can't be translated in "Actuel" that means fashionable without context (with context, see https://localize.mozilla.org/fr/sumo/translate.html?unit=956367) or "Courante" that means popular without context (with context, see https://localize.mozilla.org/fr/sumo/translate.html?unit=735339 or https://localize.mozilla.org/fr/sumo/translate.html?unit=735215). It could have been localized in "Applicable". For more, see http://dictionnaire.reverso.net/anglais-francais/current
I just made some fixes to reindexing for kb articles. One of them is an attempt to fix the problem you saw where you change the keywords and the index doesn't get updated.

I can't reproduce the problem, though, so I'm flying blind.

If you see it again, please copy and paste the urls into a comment in this bug. We'll keep this open for a while until we're content that indexing works correctly.
Scoobidiver: Which keywords did you change in that document yesterday?
(In reply to Will Kahn-Greene [:willkg] from comment #23)
> Scoobidiver: Which keywords did you change in that document yesterday?
I didn't change a keyword yesterday but the content today, specifically I added the short link. This kind of search usually works well. See https://support.mozilla.org/fr/search?q_tags=desktop&product=firefox&q=LFnkd7
Depends on: 783542
(In reply to Scoobidiver from comment #22)
> https://support.mozilla.org/fr/
> search?product=firefox&q_tags=desktop&q=LJ0h2w doesn't show
> https://support.mozilla.org/fr/kb/que-faire-pas-telecharger-enregistrer-
> fichiers
It works now. Maybe I should have waited longer.
So, we're reindexing the kb every 24 hours now. Additionally, we did a reindexing a few hours ago.

When we reindex the kb, all the symptoms will go away.

I finished up the work in bug #783542. We have a good feeling that's the culprit. That'll go out Monday and then we'll see if the problem you're seeing goes away.
(In reply to Will Kahn-Greene [:willkg] from comment #26)
> I finished up the work in bug #783542. We have a good feeling that's the
> culprit. That'll go out Monday and then we'll see if the problem you're
> seeing goes away.
It works. As soon as I add a short link and approve the article, it becomes searchable. See https://support.mozilla.org/fr/search?product=firefox&q_tags=desktop&q=MOunCV. Thanks.
We literally just pushed the changes to production about 20 minutes ago. I think we should give this until the end of the week before declaring it fixed.
I added keywords to some articles and they show up immediately (less than one second!) in search results.
For me, it's fixed
Status: NEW → RESOLVED
Closed: 12 years ago
Resolution: --- → FIXED
Awesome! Thank you so much for helping work through this!
You need to log in before you can comment on or make changes to this bug.