Skip to content

Commit ec80c6a

Browse files
authored
Merge pull request #381 from vespa-engine/tgm/remove-query-module
Tgm/remove query module
2 parents b1b4f85 + b049463 commit ec80c6a

8 files changed

+217
-1356
lines changed

setup.py

+1
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,7 @@ def get_target_version():
3030
"cryptography",
3131
"aiohttp",
3232
"tenacity",
33+
"learntorank"
3334
],
3435
extras_require={
3536
"ml": ["transformers", "torch", "tensorflow", "tensorflow_ranking", "keras_tuner"],

vespa/application.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020
from time import sleep
2121

2222
from vespa.io import VespaQueryResponse, VespaResponse
23-
from vespa.query import QueryModel
23+
from learntorank.query import QueryModel
2424
from vespa.package import ApplicationPackage
2525

2626
retry_strategy = Retry(

vespa/gallery.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
QueryProfileType,
1313
QueryTypeField,
1414
)
15-
from vespa.query import QueryModel, AND, RankProfile as Ranking
15+
from learntorank.query import QueryModel, AND, Ranking
1616

1717

1818
class TextSearch(ApplicationPackage):
@@ -58,7 +58,7 @@ def __init__(
5858
name=name,
5959
schema=[schema],
6060
default_query_model=QueryModel(
61-
name="and_bm25", match_phase=AND(), rank_profile=Ranking(name="bm25")
61+
name="and_bm25", match_phase=AND(), ranking=Ranking(name="bm25")
6262
),
6363
)
6464

vespa/package.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
from io import BytesIO
1010

1111
from vespa.json_serialization import ToJson, FromJson
12-
from vespa.query import QueryModel
12+
from learntorank.query import QueryModel
1313

1414

1515
class HNSW(ToJson, FromJson["HNSW"]):

vespa/query.py

-269
This file was deleted.

0 commit comments

Comments
 (0)