Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
24 commits
Select commit Hold shift + click to select a range
753fa9c
Added support for Elasticsearch 1.0+
clintonb Dec 30, 2015
13f962f
Merge pull request #36 from edx/clintonb/elasticsearch-update
clintonb Jan 5, 2016
d7976c7
Publishing new releases to PyPI
Jan 5, 2016
764b577
Merge pull request #41 from edx/clintonb/pypi
clintonb Jan 5, 2016
afb3d44
Update the pypi password (ECOM-3912)
cpennington Mar 17, 2016
881e772
Merge pull request #44 from edx/cale/fix-password
cpennington Mar 18, 2016
28cfaf0
Add an OEP-2 compliant openedx.yaml file
cpennington Aug 23, 2016
6009faa
Specify an owner
cpennington Aug 23, 2016
37b770e
Update owner
cpennington Aug 23, 2016
003e1fc
Merge pull request #45 from edx/add-openedx-yaml
cpennington Aug 24, 2016
ed56b29
Update version and use search test packages.
dianakhuang Feb 3, 2017
5caeb6c
Merge pull request #46 from edx/diana/use-correct-packages
maxrothman Feb 6, 2017
e111f34
Switch to using CodeCov for coverage checking.
dianakhuang Feb 6, 2017
ad44e21
Merge pull request #47 from edx/diana/use-codecov
dianakhuang Feb 6, 2017
1a6926d
Upgrade to django 1.11 and implemented tox
Jul 10, 2017
fa6e0bb
Merge pull request #48 from edx/ahsan/LEARNER-1529-upgrade-edx-search
Jul 14, 2017
be7611e
Fixed all test failures
rythmE May 20, 2021
8737be4
Added course_hashtag_list in course search
rythmE May 24, 2021
c006e14
Added hashtag to course search
rythmE May 24, 2021
6314f76
download and search feature update
rythmE Jul 13, 2021
6cf06b6
Merge branch 'master' of github.com:Learningtribes/edx-search into ha…
rythmE Jul 13, 2021
15ac9b9
bugs fixing
rythmE Jul 16, 2021
9e9d6a3
LMS explore search bug fixing
rythmE Jul 19, 2021
880d112
Merge branch 'lt-master' of github.com:Learningtribes/edx-search into…
rythmE Dec 9, 2021
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Empty file modified .coveragerc
100755 → 100644
Empty file.
Empty file modified codecov.yml
100755 → 100644
Empty file.
Empty file modified openedx.yaml
100755 → 100644
Empty file.
3 changes: 3 additions & 0 deletions search/api.py
Original file line number Diff line number Diff line change
Expand Up @@ -260,6 +260,8 @@ def course_discovery_search(search_term=None, size=20, from_=0, field_dictionary
if getattr(settings, 'ALLOW_CATALOG_VISIBILITY_FILTER', False):
use_field_dictionary['catalog_visibility'] = CATALOG_VISIBILITY_CATALOG_AND_ABOUT

hashtag_query_list = kwargs.get('hashtag_query_list', [])

results = searcher.search(
query_string=search_term,
doc_type="course_info",
Expand All @@ -271,6 +273,7 @@ def course_discovery_search(search_term=None, size=20, from_=0, field_dictionary
filter_dictionary=filter_dictionary,
exclude_dictionary=exclude_dictionary,
facet_terms=course_discovery_facets(),
hashtag_query_list=hashtag_query_list,
sort=sort_args
)

Expand Down
8 changes: 7 additions & 1 deletion search/elastic.py
Original file line number Diff line number Diff line change
Expand Up @@ -522,6 +522,7 @@ def search(self,
exclude_ids=None,
use_field_match=False,
include_content=False,
hashtag_query_list=None,
**kwargs): # pylint: disable=too-many-arguments, too-many-locals, too-many-branches, arguments-differ
"""
Implements call to search the index for the desired content.
Expand Down Expand Up @@ -640,6 +641,11 @@ def search(self,
"analyzer": "standard"
}
})
elastic_queries.append({
"terms": {
"course_hashtag_list": hashtag_query_list
}
})

if field_dictionary:
if use_field_match:
Expand Down Expand Up @@ -667,7 +673,7 @@ def search(self,
if elastic_queries:
query_segment = {
"bool": {
"must": elastic_queries
"should": elastic_queries
}
}

Expand Down
3 changes: 3 additions & 0 deletions search/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -207,6 +207,8 @@ def course_discovery(request):
status_code = 500

search_term = request.POST.get("search_string", None)
hashtag_query_list_string = request.POST.get("hashtag_query_list_string", '')
hashtag_query_list = hashtag_query_list_string.split(', ')

try:
size, from_, page = _process_pagination_values(request)
Expand All @@ -227,6 +229,7 @@ def course_discovery(request):
size=size,
from_=from_,
field_dictionary=field_dictionary,
hashtag_query_list=hashtag_query_list,
user=request.user,
allow_enrollment_end_filter=True,
sort_type=request.POST.get('sort_type', '')
Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

setup(
name='edx-search',
version='1.2.3',
version='1.1.0',
description='Search and index routines for index access',
author='edX',
author_email='oscm@edx.org',
Expand Down
4 changes: 2 additions & 2 deletions test_requirements.txt
100755 → 100644
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
-e .
coverage==4.0.3
ddt
edx-lint==0.5.5
edx-lint==0.4.0
mock==1.3.0
pep8==1.6.2
pytz
codecov
tox>=2.3.1,<3.0.0


# edX libraries
-e git+https://github.com/edx/event-tracking.git@0.1.0#egg=event-tracking
Empty file modified tox.ini
100755 → 100644
Empty file.