Skip to content

Commit

Permalink
Merge pull request #7 from DirectEmployers/searchquery-fields
Browse files Browse the repository at this point in the history
Added arg to allow for fields in run
  • Loading branch information
JLMcLaugh committed Oct 29, 2013
2 parents 9f01016 + efc2d0e commit f064f4e
Showing 1 changed file with 8 additions and 10 deletions.
18 changes: 8 additions & 10 deletions saved_search/groupsearch.py
Original file line number Diff line number Diff line change
Expand Up @@ -297,17 +297,15 @@ def add_group_query(self, query_filter, use_or=False, is_master=True,

self.gquery_filter = SearchNode()

def run(self, spelling_query=None):
def run(self, spelling_query=None, **kwargs):
"""Builds & executes the query. Returns a list of result groupings."""

final_query = self.build_query()
kwargs = {
'start_offset': self.start_offset,
'result_class': self.result_class,
'group_query': [i for i in self.group_queries],
'group_format': self.group_format,
'group_ngroups': self.group_ngroups
}

kwargs['start_offset'] = self.start_offset
kwargs['result_class'] = self.result_class
kwargs['group_query'] = [i for i in self.group_queries]
kwargs['group_format'] = self.group_format
kwargs['group_ngroups'] = self.group_ngroups

if self.order_by:
order_by_list = []
Expand All @@ -325,7 +323,7 @@ def run(self, spelling_query=None):

if self.query_facets:
kwargs['query_facets'] = self.query_facets

if self.end_offset is not None:
kwargs['end_offset'] = self.end_offset

Expand Down

0 comments on commit f064f4e

Please sign in to comment.