Skip to content

Commit

Permalink
DE-749 | wildcard analyzer [3.12] (#324)
Browse files Browse the repository at this point in the history
* DE-749 | initial commit

* Update test_analyzer.py
  • Loading branch information
aMahanna authored Apr 24, 2024
1 parent f4071f2 commit 851a71c
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion tests/test_analyzer.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
from packaging import version

from arango.exceptions import (
AnalyzerCreateError,
AnalyzerDeleteError,
Expand All @@ -7,7 +9,7 @@
from tests.helpers import assert_raises, generate_analyzer_name


def test_analyzer_management(db, bad_db, cluster, enterprise):
def test_analyzer_management(db, bad_db, cluster, enterprise, db_version):
analyzer_name = generate_analyzer_name()
full_analyzer_name = db.name + "::" + analyzer_name
bad_analyzer_name = generate_analyzer_name()
Expand Down Expand Up @@ -69,3 +71,10 @@ def test_analyzer_management(db, bad_db, cluster, enterprise):
"format": "latLngDouble",
}
assert db.delete_analyzer(analyzer_name)

if db_version >= version.parse("3.12.0"):
analyzer_name = generate_analyzer_name()
result = db.create_analyzer(analyzer_name, "wildcard", {"ngramSize": 4})
assert result["type"] == "wildcard"
assert result["features"] == []
assert result["properties"] == {"ngramSize": 4}

0 comments on commit 851a71c

Please sign in to comment.