Revert "Feanil/edx search update (#25406)" (#25412)

This reverts commit 581b20056d.
This commit is contained in:
Feanil Patel
2020-10-22 15:53:57 -04:00
committed by GitHub
parent 8b1075b27b
commit b73f755487
13 changed files with 75 additions and 100 deletions

View File

@@ -286,7 +286,7 @@ class CourseDetailViewTestCase(CourseApiTestViewMixin, SharedModuleStoreTestCase
'enrollment_end': {'type': 'date'}
})
@override_settings(SEARCH_ENGINE="search.tests.mock_search_engine.MockSearchEngine")
@override_settings(COURSEWARE_INFO_INDEX_NAME=TEST_INDEX_NAME)
@override_settings(COURSEWARE_INDEX_NAME=TEST_INDEX_NAME)
class CourseListSearchViewTest(CourseApiTestViewMixin, ModuleStoreTestCase, SearcherMixin):
"""
Tests the search functionality of the courses API.

View File

@@ -104,7 +104,7 @@ class CourseTeamIndexer(object):
"""
search_engine = cls.engine()
serialized_course_team = CourseTeamIndexer(course_team).data()
search_engine.index([serialized_course_team])
search_engine.index(cls.DOCUMENT_TYPE_NAME, [serialized_course_team])
@classmethod
@if_search_enabled
@@ -112,7 +112,7 @@ class CourseTeamIndexer(object):
"""
Remove course_team from the index (if feature is enabled).
"""
cls.engine().remove([course_team.team_id])
cls.engine().remove(cls.DOCUMENT_TYPE_NAME, [course_team.team_id])
@classmethod
@if_search_enabled

View File

@@ -723,8 +723,7 @@ if FEATURES.get('ENABLE_COURSEWARE_SEARCH') or \
SEARCH_ENGINE = "search.elastic.ElasticSearchEngine"
SEARCH_FILTER_GENERATOR = ENV_TOKENS.get('SEARCH_FILTER_GENERATOR', SEARCH_FILTER_GENERATOR)
# TODO: Once we have successfully upgraded to ES7, switch this back to ELASTIC_SEARCH_CONFIG.
ELASTIC_SEARCH_CONFIG = ENV_TOKENS.get('ELASTIC_SEARCH_CONFIG_ES7', [{}])
ELASTIC_SEARCH_CONFIG = ENV_TOKENS.get('ELASTIC_SEARCH_CONFIG', [{}])
# Facebook app
FACEBOOK_API_VERSION = AUTH_TOKENS.get("FACEBOOK_API_VERSION")