Migrated from xapian to elastic

This commit is contained in:
Théo Durr 2023-11-05 23:42:52 +01:00
parent f41ff281fb
commit fa758867cc
No known key found for this signature in database
GPG Key ID: 11E4AFB955E7883A
4 changed files with 12 additions and 32 deletions

View File

@ -2,7 +2,7 @@ name: Sith 3 CI
on: on:
push: push:
branches: [master, taiste] branches: [master, taiste, features/**]
pull_request: pull_request:
branches: [master, taiste] branches: [master, taiste]
workflow_dispatch: workflow_dispatch:
@ -21,6 +21,12 @@ jobs:
tests: tests:
name: Run tests and generate coverage report name: Run tests and generate coverage report
runs-on: ubuntu-latest runs-on: ubuntu-latest
container:
image: docker.elastic.co/elasticsearch/elasticsearch:7.17.14
env:
discovery.type: single-node
ports:
- 9200
steps: steps:
- name: Check out repository - name: Check out repository
uses: actions/checkout@v3 uses: actions/checkout@v3

28
poetry.lock generated
View File

@ -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]] [[package]]
name = "alabaster" name = "alabaster"
@ -1526,30 +1526,6 @@ files = [
{file = "wcwidth-0.2.5.tar.gz", hash = "sha256:c4d647b99872929fdb7bdcaa4fbe7f01413ed3d98077df798530e5b04f116c83"}, {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]] [[package]]
name = "zipp" name = "zipp"
version = "3.11.0" version = "3.11.0"
@ -1572,4 +1548,4 @@ testing = ["coverage"]
[metadata] [metadata]
lock-version = "2.0" lock-version = "2.0"
python-versions = "^3.8" python-versions = "^3.8"
content-hash = "62519616aff5a472dac3dd8071a6404b1ee8eab12a197af717a0520f7ded0331" content-hash = "32bf0229e7ac812ea278a36587c184cd4ae507f87816f573447e85cd5312e52c"

View File

@ -33,8 +33,6 @@ phonenumbers = "^8.12"
django-ajax-selects = "^2.1.0" django-ajax-selects = "^2.1.0"
reportlab = "^3.6" reportlab = "^3.6"
django-haystack = "^3.2.1" django-haystack = "^3.2.1"
xapian-haystack = "^3.0.1"
xapian-bindings = "^0.1.0"
libsass = "^0.22" libsass = "^0.22"
django-ordered-model = "^3.7" django-ordered-model = "^3.7"
django-simple-captcha = "^0.5.17" django-simple-captcha = "^0.5.17"

View File

@ -191,9 +191,9 @@ TEMPLATES = [
HAYSTACK_CONNECTIONS = { HAYSTACK_CONNECTIONS = {
"default": { "default": {
"ENGINE": "xapian_backend.XapianEngine", "ENGINE": "haystack.backends.elasticsearch7_backend.Elasticsearch7SearchEngine",
"PATH": os.path.join(os.path.dirname(__file__), "search_indexes", "xapian"), 'URL': 'http://localhost:9200/',
"INCLUDE_SPELLING": True, 'INDEX_NAME': 'haystack',
} }
} }