Page MenuHomePhabricator

CirrusSearch: Lower cache time for suggestions
Closed, ResolvedPublic

Description

We say that one of Cirrus's improvements is that it makes things near real time. We don't really deliver on that promise on prefix searches because they are cached for 25 hours.


Version: unspecified
Severity: normal

Details

Reference
bz60007

Event Timeline

bzimport raised the priority of this task from to Medium.Nov 22 2014, 2:50 AM
bzimport added a project: CirrusSearch.
bzimport set Reference to bz60007.

This should just be a config change. We'll want to lower $wgSearchSuggestCacheExpiry on wikis that have Cirrus.

From a talk page:

I'm reasonably sure what you are seeing is the 24 hour cache time on prefix searches. I saw that a few months ago and thought it would be problematic but then forgot about it. I've filed a [bz:60007|bug] for it so I won't forget it again. I can't promise anything on this soon because prefix search really is slower then I'd like. We have an inflight fix that cuts the time for short prefixes on large wikis more than in half but it still isn't fast enough. I'm told there are features in the Elasticsearch that should let me cut that by an order of magnitude but they are still labelled "experimental". At some point I'll have a look at that though.

Another option, while I'm thinking about it, is to make the cache time relative to the number of characters being prefix searched and the size of the wiki. Only wikis with tons of titles really need much caching. Also it doesn't do too much good to cache prefixes longer than a few characters I think.

Change 112577 had a related patch set uploaded by Chad:
Lower search cache expiry to 12 hours on all wikis

https://gerrit.wikimedia.org/r/112577

Change 112577 merged by jenkins-bot:
Lower search cache expiry to 12 hours on all wikis

https://gerrit.wikimedia.org/r/112577

Down to 12 hours. Better, but not best.

Already at 6. Lowering to 3 with gerrit 136449.

Actually, it's 5 minutes because I can't tell time. I think that's probably good enough :)