From de31af2a3910fecb06f18d466bf9f900cc1b2eec Mon Sep 17 00:00:00 2001 From: wes Date: Mon, 8 Aug 2016 15:30:41 -0400 Subject: [PATCH] convert course to json before indexing --- src/search.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/search.py b/src/search.py index 848b455..f95cbdf 100755 --- a/src/search.py +++ b/src/search.py @@ -106,11 +106,12 @@ def indexListing(course): } """ - courseID = hashsec(course) + json_course = classToJSON(course) + courseID = hashsec(json_course) print es.index(index="oersearch", doc_type="course", id=courseID, - body=course) + body=json_course) # For every course we index, we also create a resource for it # This should be an idempotent operation because we're putting it in couchdb