diff --git a/README.rst b/README.rst index 4c81b15..caad045 100644 --- a/README.rst +++ b/README.rst @@ -76,6 +76,7 @@ This plugin provides the following settings to Open edX components for integrati - (common) ``TYPESENSE_ENABLED: bool = True`` - whether the Typesense backend is enabled - (common) ``TYPESENSE_COLLECTION_PREFIX: str = "the_configured_collection_prefix"`` - a prefix that the backend should use for all collections (the API key is scoped to this prefix) +- (common) ``FORUM_SEARCH_BACKEND = "forum.search.typesense.TypesenseBackend"`` - necessary to override Tutor's default forum search backend value pointing to Meilisearch - (cms, lms) ``TYPESENSE_URL: str = "http://typesense:8108"`` - the internal url for accessing the Typesense API - (cms, lms) ``TYPESENSE_PUBLIC_URL: str = "http://(depends on TYPESENSE_PUBLIC_HOST)"`` - the public url to the Typesense API (for user searches on the frontend) - (cms, lms) ``TYPESENSE_API_KEY: str = "the api key"`` - an api key for the Open edX backend to make updates to Typesense collections diff --git a/tutor_typesense/patches/k8s-deployments b/tutor_typesense/patches/k8s-deployments index d563f52..86fe3cd 100644 --- a/tutor_typesense/patches/k8s-deployments +++ b/tutor_typesense/patches/k8s-deployments @@ -24,6 +24,9 @@ spec: value: "{{ TYPESENSE_BOOTSTRAP_API_KEY }}" - name: TYPESENSE_DATA_DIR value: /typesense_data + # forum expects up to 1000 per page - https://github.com/openedx/forum/blob/master/forum/constants.py + - name: TYPESENSE_MAX_PER_PAGE + value: "1000" ports: - containerPort: 8108 volumeMounts: diff --git a/tutor_typesense/patches/local-docker-compose-services b/tutor_typesense/patches/local-docker-compose-services index cd6a2ac..47d4d4a 100644 --- a/tutor_typesense/patches/local-docker-compose-services +++ b/tutor_typesense/patches/local-docker-compose-services @@ -6,4 +6,6 @@ typesense: environment: TYPESENSE_API_KEY: "{{ TYPESENSE_BOOTSTRAP_API_KEY }}" TYPESENSE_DATA_DIR: "/typesense_data" + # forum expects up to 1000 per page - https://github.com/openedx/forum/blob/master/forum/constants.py + TYPESENSE_MAX_PER_PAGE: "1000" restart: unless-stopped diff --git a/tutor_typesense/patches/openedx-common-settings b/tutor_typesense/patches/openedx-common-settings index 6ff8566..975aefa 100644 --- a/tutor_typesense/patches/openedx-common-settings +++ b/tutor_typesense/patches/openedx-common-settings @@ -1,2 +1,3 @@ TYPESENSE_ENABLED = True TYPESENSE_COLLECTION_PREFIX = "{{ TYPESENSE_COLLECTION_PREFIX }}" +FORUM_SEARCH_BACKEND = "forum.search.typesense.TypesenseBackend"