# textseek
A text search tool for the terminal with ranking.
It indexed files per line and allows searching in them.
## Building
Ensure you have docker installed.
```bash
make
```
That's all!
## Usage
Searching and indexing (per line) at the same time:
```bash
./ft "Harry and Ron" "harry-potter-1.txt harry-potter-2.txt harry-potter-3.txt"
```
### Only indexing (per-line):
```bash
./ft _ "harry-potter-1.txt harry-potter-2.txt harry-potter-3.txt"
```
### Only searching:
```bash
./ft "Harry and Ron"
```
### Index whole files:
```bash
./ft _ -f "harry-potter-1.txt harry-potter-2.txt harry-potter-3.txt"
```
### Remarks
The application outputs more than just JSON but that's done using stderr. The stdout is just clean JSON and thus the application output is usable for other processes.
### Todo
- result limit
- register start byte
- register end byte
- chunking index lines
- chunking index chars