mirror of
https://github.com/bitcoinresearchkit/brk.git
synced 2026-04-30 09:30:00 -07:00
server: mcp + global: refactor
This commit is contained in:
@@ -1,28 +0,0 @@
|
||||
use std::path::Path;
|
||||
|
||||
use brk_computer::Computer;
|
||||
use brk_indexer::Indexer;
|
||||
use brk_query::{Index, Query};
|
||||
use brk_vec::{Computation, Format};
|
||||
|
||||
pub fn main() -> color_eyre::Result<()> {
|
||||
color_eyre::install()?;
|
||||
|
||||
let outputs_dir = Path::new("../../_outputs");
|
||||
|
||||
let format = Format::Compressed;
|
||||
|
||||
let mut indexer = Indexer::new(outputs_dir, true)?;
|
||||
indexer.import_vecs()?;
|
||||
|
||||
let mut computer = Computer::new(outputs_dir, None, format);
|
||||
computer.import_vecs(&indexer, Computation::Lazy)?;
|
||||
|
||||
let query = Query::build(&indexer, &computer);
|
||||
|
||||
dbg!(query.search_and_format(Index::Height, &["date"], Some(-1), None, None)?);
|
||||
dbg!(query.search_and_format(Index::Height, &["date"], Some(-10), None, None)?);
|
||||
dbg!(query.search_and_format(Index::Height, &["date", "timestamp"], Some(-10), None, None)?);
|
||||
|
||||
Ok(())
|
||||
}
|
||||
Reference in New Issue
Block a user