tg-archive icon indicating copy to clipboard operation
tg-archive copied to clipboard

[FEATURE REQUEST] Searchengine

Open Bingenberger opened this issue 3 years ago • 9 comments

Is it possible to add a sitewide search into the static html-page? We got a pretty big archive and finding old posts will be much easier with a searchengine included.

Bingenberger avatar Jan 15 '22 19:01 Bingenberger

I haven't thought about this, but I guess you could include some sort of a JS search plugin in your site template.

knadh avatar Jan 16 '22 14:01 knadh

Suggestion for a static local search engine: Lunr

There's a Python implementation which produces files readable by the JavaScript version: https://pypi.org/project/lunr/

joschi avatar Jan 22 '22 00:01 joschi

Will experiment with Lunr sometime, @joschi. The size of the index might get out of hand for big channels.

knadh avatar Jan 23 '22 09:01 knadh

Why not search via MySQL. This would of course require that the database runs in a Mysql database.

f0xcb avatar Jul 12 '22 13:07 f0xcb

@f0xcb MySQL is quite a heavy dependency and you'd need an active backend service talking to the MySQL database (which doesn't exist yet) in order to run searches.

joschi avatar Jul 12 '22 13:07 joschi

MySQL is not necessary. tg-archive stores all data in an sqlite DB anyway, which has good full text support. It's possible to build a separate frontend which simply reads this DB file and presents a searchable site. That's not in the scope of tg-archive though, as it only aims to sync data and generate static sites.

knadh avatar Jul 13 '22 05:07 knadh

I would like to have this feature too. My telegram group is deleted and I'm struggling to search for old but valuable content in chat history.

dangnhdev avatar Aug 18 '22 03:08 dangnhdev

Relevant to this discussion: https://github.com/tinysearch/tinysearch

knadh avatar Sep 27 '22 07:09 knadh

Would love to have server search as well.

rvnikita avatar May 09 '23 01:05 rvnikita