8000 GitHub - mosmeh/indexa-http: HTTP server and web interface for indexa
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

HTTP server and web interface for indexa

License

Notifications You must be signed in to change notification settings

mosmeh/indexa-http

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

indexa-http

build

HTTP server and web interface for indexa

Usage

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.

API

GET /info: Get database information

curl 'http://127.0.0.1:8080/info'

Example response

{
    "numEntries": 1287895,
    "rootDirs": ["/"],
    "indexed": ["basename", "path", "extension", "size", "modified"],
    "fastSortable": ["basename", "modified"]
}

GET /search: Search

curl 'http://127.0.0.1:8080/search?query=foo&statuses=basename,size,path&sortBy=modified&sortOrder=desc'

Parameters

  • query
  • limit
  • statuses
  • matchPath
  • caseSensitivity
  • regex
  • sortBy
  • sortOrder
  • sortDirsBeforeFiles

Example response

{
    "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"
            }
        },
        ...
    ]
}

Command-line options

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

About

HTTP server and web interface for indexa

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published
0