diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 7cd386d5..ae55dc1b 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -2,7 +2,7 @@ name: Sith 3 CI on: push: - branches: [master, taiste] + branches: [master, taiste, features/**] pull_request: branches: [master, taiste] workflow_dispatch: @@ -21,6 +21,12 @@ jobs: tests: name: Run tests and generate coverage report runs-on: ubuntu-latest + container: + image: docker.elastic.co/elasticsearch/elasticsearch:7.17.14 + env: + discovery.type: single-node + ports: + - 9200 steps: - name: Check out repository uses: actions/checkout@v3 diff --git a/poetry.lock b/poetry.lock index 23ef0bda..8dda3a6e 100644 --- a/poetry.lock +++ b/poetry.lock @@ -1,4 +1,4 @@ -# This file is automatically @generated by Poetry 1.5.1 and should not be changed by hand. +# This file is automatically @generated by Poetry 1.6.1 and should not be changed by hand. [[package]] name = "alabaster" @@ -1526,30 +1526,6 @@ files = [ {file = "wcwidth-0.2.5.tar.gz", hash = "sha256:c4d647b99872929fdb7bdcaa4fbe7f01413ed3d98077df798530e5b04f116c83"}, ] -[[package]] -name = "xapian-bindings" -version = "0.1.0" -description = "Meta-package to build and install xapian-bindings extension." -optional = false -python-versions = "*" -files = [ - {file = "xapian-bindings-0.1.0.tar.gz", hash = "sha256:f2b0396082ebf4f6681ab43d6d8fd1f63b6964b18c32c91236ed067c6f62ad14"}, -] - -[[package]] -name = "xapian-haystack" -version = "3.0.1" -description = "A Xapian backend for Haystack" -optional = false -python-versions = "*" -files = [ - {file = "xapian-haystack-3.0.1.tar.gz", hash = "sha256:a5c0e1262b95008df4dfeb58d093c654acee3f2b27ea3f7d366900895cdc70f9"}, -] - -[package.dependencies] -django = ">=2.2" -django-haystack = ">=2.8.0" - [[package]] name = "zipp" version = "3.11.0" @@ -1572,4 +1548,4 @@ testing = ["coverage"] [metadata] lock-version = "2.0" python-versions = "^3.8" -content-hash = "62519616aff5a472dac3dd8071a6404b1ee8eab12a197af717a0520f7ded0331" +content-hash = "32bf0229e7ac812ea278a36587c184cd4ae507f87816f573447e85cd5312e52c" diff --git a/pyproject.toml b/pyproject.toml index cb1a6aaf..b007b821 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -33,8 +33,6 @@ phonenumbers = "^8.12" django-ajax-selects = "^2.1.0" reportlab = "^3.6" django-haystack = "^3.2.1" -xapian-haystack = "^3.0.1" -xapian-bindings = "^0.1.0" libsass = "^0.22" django-ordered-model = "^3.7" django-simple-captcha = "^0.5.17" diff --git a/sith/settings.py b/sith/settings.py index 5ed279af..2957ad4c 100644 --- a/sith/settings.py +++ b/sith/settings.py @@ -191,9 +191,9 @@ TEMPLATES = [ HAYSTACK_CONNECTIONS = { "default": { - "ENGINE": "xapian_backend.XapianEngine", - "PATH": os.path.join(os.path.dirname(__file__), "search_indexes", "xapian"), - "INCLUDE_SPELLING": True, + "ENGINE": "haystack.backends.elasticsearch7_backend.Elasticsearch7SearchEngine", + 'URL': 'http://localhost:9200/', + 'INDEX_NAME': 'haystack', } }