forked from quickwit-oss/search-benchmark-game
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
39 lines (29 loc) · 1.04 KB
/
Makefile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
CORPUS := $(shell pwd)/corpus.json
export
WIKI_SRC = "https://www.dropbox.com/s/wwnfnu441w1ec9p/wiki-articles.json.bz2"
COMMANDS ?= TOP_10 TOP_10_COUNT COUNT
ENGINES ?= tantivy-0.11 lucene-8.0.0 lucene-8.4.0 bleve-0.8.0-scorch rucene-0.1 pisa-0.8.2
PORT ?= 8080
all: index
corpus:
@echo "--- Downloading $(WIKI_SRC) ---"
@curl -# -L "$(WIKI_SRC)" | bunzip2 -c | python3 corpus_transform.py > $(CORPUS)
clean:
@echo "--- Cleaning directories ---"
@rm -fr results
@for engine in $(ENGINES); do cd ${shell pwd}/engines/$$engine && make clean ; done
index:
@echo "--- Indexing corpus ---"
@for engine in $(ENGINES); do cd ${shell pwd}/engines/$$engine && make index ; done
bench:
@echo "--- Benchmarking ---"
@rm -fr results
@mkdir results
@python3 src/client.py queries.txt $(ENGINES)
compile:
@echo "--- Compiling binaries ---"
@for engine in $(ENGINES); do cd ${shell pwd}/engines/$$engine && make compile ; done
serve:
@echo "--- Serving results ---"
@cp results.json web/output/results.json
@cd web/output && python3 -m http.server $(PORT)