forked from quickwit-oss/search-benchmark-game
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
49 lines (36 loc) · 1.32 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
40
41
42
43
44
45
46
47
48
49
CORPUS := $(shell pwd)/corpus.json
export
WIKI_SRC = "https://www.dropbox.com/s/wwnfnu441w1ec9p/wiki-articles.json.bz2"
# COMMANDS ?= TOP_100 TOP_100_COUNT COUNT
COMMANDS ?= TOP_10_COUNT TOP_10 COUNT
# ENGINES ?= pisa-0.8.2 rucene-0.1 bleve-0.8.0-scorch bluge-0.2.2
# single field search
# ENGINES ?= seekstorm-0.1.15-singlefield tantivy-0.22-singlefield lucene-9.9.2-singlefield
# multi field search
ENGINES ?= seekstorm-0.1.15-multifield tantivy-0.22-multifield lucene-9.9.2-multifield
PORT ?= 8080
help:
@grep '^[^#[:space:]].*:' Makefile
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/build/results.json
@cd web/build && python3 -m http.server $(PORT)