Commit Graph

6 Commits

Author SHA1 Message Date
evazion
9b48c98c61 Fix #4614: Counts endpoint responds with invalid JSON.
Caused by the search timing out and returning nil for the count. Nil got
serialized as the empty string instead of as null.
2020-12-05 13:10:11 -06:00
Aaron Franke
191b528ad7 Ensure files end in newlines (POSIX compliance) 2020-10-04 05:13:39 -04:00
evazion
41c6c882c2 search: refactor fast_count to return nil on timeout.
* Refactor fast_count to return nil instead of 1,000,000 if the exact count times out.
* Remove the estimate_post_counts and blank_tag_search_fast_count global config options.
* Replace the hardcoded post count estimates inside fast_count with a
  method that parses Postgres's estimated row count from EXPLAIN.

* /counts/posts.json:
** Remove the `raise_on_timeout` parameter.
** Add an `estimate_count=<true|false>` parameter.
** Return null instead of 1,000,000 if the exact count times out.
2020-05-07 21:02:22 -05:00
evazion
6a984de3d5 views: refactor page titles.
Refactor `page_title` helper to automatically include site name.
2020-01-25 01:52:18 -06:00
Toks
6187d9b483 Add ui for accessing search post counts
fixes #2528
2015-11-13 00:41:06 -05:00
r888888888
2f2c892670 fixes #742, #590: add new counts controller api 2013-06-07 16:32:48 -07:00