HTTP server and web interface for indexa
Clone this repository and run:
cargo run --release
It will locate and load indexa's database and config.
The web interface is at http://127.0.0.1:8080 by default.
curl 'http://127.0.0.1:8080/info'
{
"numEntries": 1287895,
"rootDirs": ["/"],
"indexed": ["basename", "path", "extension", "size", "modified"],
"fastSortable": ["basename", "modified"]
}
curl 'http://127.0.0.1:8080/search?query=foo&statuses=basename,size,path&sortBy=modified&sortOrder=desc'
- query
- limit
- statuses
- matchPath
- caseSensitivity
- regex
- sortBy
- sortOrder
- sortDirsBeforeFiles
{
"query": "foo",
"numHits": 573,
"hits": [
{
"isDir": false,
"basename": "foo.rs",
"path": "/path/to/file/foo.rs",
"size": 42,
"highlighted": {
"basename": "<em>foo</em>.rs",
"path": "/path/to/file/<em>foo</em>.rs"
}
},
...
]
}
USAGE:
indexa-http [OPTIONS]
OPTIONS:
-a, --addr <addr> Address to listen on [default: 127.0.0.1:8080]
-t, --threads <threads> Number of threads to use
-C, --config <config> Location of a config file