Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

DE-756 | optimizeTopK View [3.12] #323

Merged
merged 7 commits into from
Apr 26, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 17 additions & 1 deletion tests/test_view.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
from packaging import version

from arango.exceptions import (
ViewCreateError,
ViewDeleteError,
Expand All @@ -10,7 +12,7 @@
from tests.helpers import assert_raises, generate_view_name


def test_view_management(db, bad_db, col, cluster):
def test_view_management(db, bad_db, col, cluster, db_version, enterprise):
# Test create view
view_name = generate_view_name()
bad_view_name = generate_view_name()
Expand Down Expand Up @@ -122,6 +124,20 @@ def test_view_management(db, bad_db, col, cluster):
# Test delete missing view with ignore_missing set to True
assert db.delete_view(view_name, ignore_missing=True) is False

if enterprise and db_version >= version.parse("3.12"):
res = db.create_view(
view_name,
view_type,
properties={
"links": {col.name: {"fields": {}}},
"optimizeTopK": [
"BM25(@doc) DESC",
],
},
)
assert "optimizeTopK" in res
aMahanna marked this conversation as resolved.
Show resolved Hide resolved
db.delete_view(view_name)


def test_arangosearch_view_management(db, bad_db, cluster):
# Test create arangosearch view
Expand Down
Loading