Skip to content

Commit

Permalink
Move AddQuery to last so it works right
Browse files Browse the repository at this point in the history
  • Loading branch information
willkg committed Oct 13, 2011
1 parent 775c833 commit c835922
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions oedipus/__init__.py
Expand Up @@ -467,11 +467,6 @@ def _sphinx(self):
sphinx.SetGroupBy(group_by[0], sphinxapi.SPH_GROUPBY_ATTR,
self._extended_sort_fields([group_by[1]]))

# Add query. This must be done after filters and such are set up, or
# they may not apply.
self._query = query
sphinx.AddQuery(query, self.meta.index)

# set the final set of weights here
if weights:
# weights are name -> field_weight where the field_weights
Expand All @@ -492,6 +487,11 @@ def _sphinx(self):
else: # self._slice is a number.
sphinx.SetLimits(self._slice, 1)

# Add query. This must be done last because otherwise things don't
# work.
self._query = query
sphinx.AddQuery(query, self.meta.index)

return sphinx

def _results(self):
Expand Down

0 comments on commit c835922

Please sign in to comment.