EXPLAIN WITH t AS (
SELECT *, '测试' <<-> "textLines" distance
FROM tbmi_ocr_line
WHERE '测试' <% "textLines"
AND "textLines" LIKE '%测试%'
ORDER BY distance ASC, "imageId" DESC)
SELECT * FROM t WHERE distance < 1;
EXPLAIN
SELECT *, bigm_similarity('测试', "textLines") similarity
FROM tbmi_ocr_line
WHERE "textLines" LIKE likequery('测试')
ORDER BY similarity DESC;
https://stackoverflow.com/questions/2495997/postgresql-full-text-search-in-postgresql-japanese-chinese-arabic https://stackoverflow.com/questions/75419400/how-to-implement-a-specific-parser-chinese-for-postgresql-full-text-search-in
https://www.postgresql.org/docs/current/textsearch-dictionaries.html https://wiki.openoffice.org/wiki/Dictionaries https://en.wikipedia.org/wiki/Snowball_(programming_language)
https://github.com/amutu/zhparser https://github.com/HiraokaHyperTools/textsearch_ja
https://github.com/dex-max/textsearch_ja https://www.postgresql.org/ftp/projects/pgFoundry/textsearch-ja/textsearch_ja/ https://wiki.postgresql.org/index.php?title=Pgfoundry&diff=34736&oldid=17466 https://dba.stackexchange.com/questions/116548/anybody-know-story-behind-pgfoundry-postgresql-project-site-downtime
https://stackoverflow.com/questions/56850635/multilingual-full-text-search-with-postgresql
https://www.postgresql.org/docs/current/pgtrgm.html
postgres/postgres@b87b52b
https://pgsql-hackers.postgresql.narkive.com/KkIwRBQN/slightly-insane-use-of-use-wide-upper-lower-in-pg-trgm https://www.postgrespro.com/list/thread-id/1293342 postgres/postgres@7844608 pgbigm/pg_bigm@685eed2
https://github.com/postgres/postgres/blob/d81dcc8d6243054e3bde40c6fb2b2a0be4b19da6/contrib/pg_trgm/trgm_op.c#L260-L262 https://github.com/postgres/postgres/blob/9e345415bcd3c4358350b89edfd710469b8bfaf9/src/include/utils/pg_crc.h#L65-L82 https://github.com/postgres/postgres/blob/66e9df9f6ef50719b25ca63b60aad934e14f4a1c/src/backend/utils/hash/pg_crc.c#L27-L35 https://postgrespro.com/list/thread-id/1853644 https://crccalc.com
https://github.com/pgbigm/pg_bigm/blob/master/docs/pg_bigm_en.md
https://stackoverflow.com/questions/8269916/what-is-sliding-window-algorithm-examples https://en.wikipedia.org/wiki/Window_function_(SQL) https://en.wikipedia.org/wiki/Moving_average
https://stackoverflow.com/questions/7727686/whats-the-difference-between-an-inverted-index-and-a-plain-old-index
EXPLAIN SELECT *, bigm_similarity('测试', "textLines") similarity FROM tbmi_ocr_line WHERE "textLines" LIKE likequery('测试') ORDER BY similarity DESC;