searchx

command module
v0.1.0-beta Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 30, 2022 License: Apache-2.0 Imports: 1 Imported by: 0

README

Introduction

English | 简体中文

🔍 Enhance Telegram Group/Channel Search In 5 Minutes 🚀

Features

  • Minimal configuration & single file one-click launch
  • Component-based scalable design & multiple storage engine options
  • Chinese optimization of search engine
  • Large number of historical messages to import
  • Customizable i18n message templates
  • ......

Deployment

  1. Prepare Telegram Bot
    1. Get Bot Token: How to create a Bot
    2. Disable Group Privacy: send /setprivacy to @BotFather
  2. Get Telegram User ID: @userinfobot
  3. Prepare searchx
    1. Download searchx: go to GitHub Releases and uncompress it.
    2. Change YOUR_BOT_TOKEN YOUR_ADMIN_ID in config/config.min.yaml to Bot Token Telegram User ID
  4. Start: ./searchx run -c config/config.min.yaml
  5. Invite Bot to groups/channels

Customization

For the vast majority of users, the default minimal configuration is sufficient.

If you have more customization needs, please refer to config.full.yaml and its comments.

Command

version

View version information

./searchx version
Version: 0.0.0
Commit: 5cae8dc
Date: 2022-07-30T07:58:05Z

go1.17.3 windows/amd64

source

Bot only indexes messages during the join period, use this command if you want to index history messages.

Support groups/channels, support very large JSON file.

Use official client to export history messages. Export options: Uncheck all, format as JSON.

  • -f: exported history messages in JSON file
  • -d: search engine driver
  • -o: search engine options
# Using bleve to import messages
./searchx source -f YOUR_PATH/result.json -d bleve -o path="index" -o dict="config/dict.txt"

query

Command line query

  • -d: search engine driver
  • -o: search engine options
  • -q: keyword
  • --pn: page number, start from 0, default is 0
  • --ps: number of result per page, default is 10
  • --json: output as JSON format
# Using bleve to query
./searchx query -d bleve -o path="index" -o dict="config/dict.txt" -q KEYWORD --pn 0 --ps 10 --json

FAQ

Q: I'm having problems using it?

A: If you still can't solve the problem after searching, give feedback by SUBMIT ISSUE.

When submit an ISSUE, we recommend describing the problem in English and providing relevant screenshots and steps to reproduce it.

Q: I want to add a feature?

A: Same as above

Q: Why do I need to disable Group Privacy? Does it cause security issues?

A: When Group Privacy is enabled, it will cause Bot to not receive all messages in the group, resulting in missing indexes. Please refer to: https://core.telegram.org/bots#privacy-mode At the same time, it does not create security issues. The project is self-deployed and the data is stored locally, so it will not lead to data leakage.

LICENSE

Apache License 2.0

Documentation

The Go Gopher

There is no documentation for this package.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL