-
Search is a bit odd. Search for coffee and a few posts that mention coffee appear before the thread with coffee in the title. Bit slow too.
I've changed the ranking algorithm and it performs better for that search and a few others I tried.
Speed is determined by number of search results... it needs to sort them all and rank them all even though it's only showing the first 10.
"bottom bracket" takes way longer than "sks bottom bracket". Greater specificity reduces the resultset which speeds it up.
I'm thinking of making search "titles only" by default to make it super fast for finding threads, and then optionally slower for searching comments.
Comparison:
Search results for: coffee
13,714 matches. Search took 0.885 seconds.Search results for: coffee inTitle:true
51 matches. Search took 0.198 secondsIt's also true that presently our Postgres server needs moar RAM (it's already on 8GB) as there are edge cases in which the server will prioritise what is in RAM... and at times the search index is not. So first searches that push the search index back into RAM might take 6 seconds rather than 0.8 seconds.
Postgres full text search is actually a stop-gap. Eventually we'll be using Elastic Search, but using Postgres helps us to define the ES configuration we'd need and the feature set (which things to put in the search schema).
Anyhow, search is now better, but we can tweak more in future.
Search is a bit odd. Search for coffee and a few posts that mention coffee appear before the thread with coffee in the title. Bit slow too. FF Android.