Skip to content

A toy document DB implemented in Rust supporting elasticsearch-like queries

License

Notifications You must be signed in to change notification settings

maronuu/eRusticDB

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

18 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

eRusticDB

What

A toy document-oriented DB implemented in Rust. It supports Lucene-like (elasticsearch-like) filtering queries. It uses RocksDB as a storage engine.

Run

Launch server

Launch server at localhost:8080.

cargo run

Send requests

  • Download wikipedia-movie-data from here.

  • Add many entries into DB. You can ctrl+C at any time.

./test.sh
  • Search documents with conditions.
# all docs
$ time curl -s --get http://localhost:8080/docs | jq ".count"
2063
curl -s --get http://localhost:8080/docs  0.00s user 0.01s system 7% cpu 0.177 total
jq ".count"  0.04s user 0.00s system 26% cpu 0.179 total

# with conditions
$ time curl -s --get http://localhost:8080/docs --data-urlencode 'q=year:>1901' | jq ".count"
1781
curl -s --get http://localhost:8080/docs --data-urlencode 'q=year:>1901'  0.00s user 0.01s system 6% cpu 0.172 total
jq ".count"  0.05s user 0.00s system 27% cpu 0.173 total

Reference

About

A toy document DB implemented in Rust supporting elasticsearch-like queries

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published