mitodl / mit-open

BSD 3-Clause "New" or "Revised" License
0 stars 2 forks source link

define method for cleaning opensearch query so it is compatible with percolation #724

Closed shanbady closed 5 months ago

shanbady commented 5 months ago

We need a method that takes an opensearch query object or dictionary and converts it for use as a percolator query.

Currently an opensearch query contains a 'query' attribute which contains a string a user searched for and a 'post_filter' which contains filters that the user toggled such as 'topic' or 'offered by'. we need to combine them into a single query and then also remove the 'has_child' filters since percolate doesnt support related queries.

We do something similar in micromasters (minus the removal of related queries)

shanbady commented 5 months ago

taken care of in https://github.com/mitodl/mit-open/issues/726