Index and search file content (xlsx, csv, pdf)
``` POST http://localhost:8080/index { "file_path": "/home/nordine/test.xlsx" }
```
GET http://localhost:8080/search?page=0&per_page=10&q=sango&query_type=regexQuery
| env | default value |
| ------------------------------ | ----------------------------------- |
| SERVICECOLLECTIONNAME | file-search |
| SERVICEHOST | 0.0.0.0 |
| SERVICEPORT | 8080 |
| INDEXDIRPATH | /tmp/__tantivy_data
|
| RUSTLOG | N/A |
| INDEXWRITER_SIZE | 50000000 (50mb) |
/etc/systemd/system/file-search.service
and paste the following:```
[Unit]
Description=File Index Search service
After=network.target
StartLimitIntervalSec=0
[Service]
Environment=RUSTLOG=debug
Environment=INDEXDIRPATH=
[Install] WantedBy=multi-user.target ```
sudo systemctl start file-search
sudo journalctl -f -u file-search