about summary refs log tree commit diff
diff options
context:
space:
mode:
authorJune McEnroe <june@causal.agency>2021-05-07 17:27:15 -0400
committerJune McEnroe <june@causal.agency>2021-05-07 17:31:52 -0400
commitcb74efc6054577367fb918565e6ac9ad33f6071e (patch)
tree3bad040f7ce6d46a4d29022ee5a3a106bd0f56db
parentGet list of formats to test from unscoop itself (diff)
downloadlitterbox-cb74efc6054577367fb918565e6ac9ad33f6071e.tar.gz
litterbox-cb74efc6054577367fb918565e6ac9ad33f6071e.zip
Limit query interface results using search.rowid DESC
This vastly increases the speed of the query for any search with a
decent number of matches. It can be slightly less accurate since
it depends on the insert order of events, but that usually won't
be a problem for a query limited to a single network. The litterbox
query interface isn't meant to exhaustively list results either.
Diffstat (limited to '')
-rw-r--r--litterbox.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/litterbox.c b/litterbox.c
index 19bdca6..f219d37 100644
--- a/litterbox.c
+++ b/litterbox.c
@@ -288,7 +288,7 @@ static void querySearch(struct Message *msg) {
 			WHERE contexts.network = :network
 				AND coalesce(contexts.query = :query, true)
 				AND search MATCH :search
-			ORDER BY time DESC, event DESC
+			ORDER BY search.rowid DESC
 			LIMIT :limit
 		)
 		SELECT * FROM results
le='2019-12-20 18:05:04 -0500'>2019-12-20Source .editrc before applying -v or -eJune McEnroe Otherwise a bind -v in .editrc will take precedence and overwrite the ^I binding for sh-complete. 2019-12-20Disable signing commitsJune McEnroe Why did I ever turn this on? This gets me nothing but inconvenience. RIP to all the wasted bytes in my git repos. 2019-12-19Ignore about-filterJune McEnroe 2019-12-19Fix matching make tags with no sourcesJune McEnroe 2019-12-19Avoid matching := assignments as tagsJune McEnroe 2019-12-18Hide line numbers when rendering mdocJune McEnroe Hack: output an extra <td> after rendering mdoc so that line numbers can be hidden based on there being three. This required splitting source-filter and about-filter since on about pages there is no table. 2019-12-18Customize cgit CSSJune McEnroe 2019-12-18Use :target rather than :focus pseudo-classJune McEnroe :target persists after you click on something else. 2019-12-18Copy cgit auxiliary binaries properlyJune McEnroe 2019-12-18Add git.causal.agency cgit configJune McEnroe 2019-12-18Bail from hi if input is binaryJune McEnroe NULs in the input cause an infinite loop in htmlEscape, not to mention regexes obviously not working, etc. 2019-12-16Post "cgit setup"June McEnroe