Skip to content

Instantly share code, notes, and snippets.

@avremel
Created May 17, 2018 19:22
Show Gist options
  • Save avremel/c4200bcb5c1540e7c42f97387532e576 to your computer and use it in GitHub Desktop.
Save avremel/c4200bcb5c1540e7c42f97387532e576 to your computer and use it in GitHub Desktop.
def apply_facet_filters(self):
if self.there_are_facets():
for facet, facet_arr in self.facet_filter.items():
if len(facet_arr) > 0:
new_facet_arr = []
for a_facet in facet_arr:
new_facet_arr.append("{0}: \"{1}\"".format(facet, a_facet))
self.solr_args.append(('fq', ' OR '.join(new_facet_arr)))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment