Skip to content
This repository has been archived by the owner on Jan 5, 2019. It is now read-only.

simplifying the search -> content logic #13

Open
jaredhirsch opened this issue Apr 17, 2015 · 0 comments
Open

simplifying the search -> content logic #13

jaredhirsch opened this issue Apr 17, 2015 · 0 comments

Comments

@jaredhirsch
Copy link
Member

right now, we do some clumsy, repetitive DB fetches to get from a given visit, to the next visit page that isn't a search page.

but, if someone is searching for something and they get an interesting result, can't we just infer that the very next visit will be to the result (or the interstitial page, followed by the result)?

this is relevant because the visit table in the places DB is sequentially numbered. So, for a given search visit with ID N, we could just look at the pages with visit ID N+1, N+2, and see if either of those is a content page.

because there will be clusters of sequential visit IDs, like "101,102,103,255,256,257", it seems possible to fetch all the visits (and associated pages) in a single query.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

1 participant