file-search

Crates.iofile-search
lib.rsfile-search
version0.1.11
sourcesrc
created_at2023-08-07 13:01:31.669166
updated_at2023-11-09 17:59:55.624562
descriptionFile indexing and search
homepage
repositoryhttps://github.com/nbittich/file-search
max_upload_size
id937924
size107,563
Nordine Bittich (nbittich)

documentation

README

File search

Index and search file content (xlsx, csv, pdf)

endpoints

Index

POST http://localhost:8080/index
{
  "file_path": "/home/nordine/test.xlsx"
}

Search

GET http://localhost:8080/search?page=0&per_page=10&q=sango&query_type=regexQuery

environment variables:

env default value
SERVICE_COLLECTION_NAME file-search
SERVICE_HOST 0.0.0.0
SERVICE_PORT 8080
INDEX_DIR_PATH /tmp/__tantivy_data
RUST_LOG N/A
INDEX_WRITER_SIZE 50000000 (50mb)

install

  • use the installation script from the latest release

  • create file /etc/systemd/system/file-search.service and paste the following:

[Unit]
Description=File Index Search service
After=network.target
StartLimitIntervalSec=0
[Service]
Environment=RUST_LOG=debug
Environment=INDEX_DIR_PATH=<your-home>/.tantivy_data
Type=simple
Restart=always
RestartSec=1
User=<your-user>
ExecStart=<your-home>/.cargo/bin/file-search

[Install]
WantedBy=multi-user.target
  • start service: sudo systemctl start file-search
  • check logs: sudo journalctl -f -u file-search
Commit count: 56

cargo fmt