Skip to content

Commit

Permalink
Add routing to page search
Browse files Browse the repository at this point in the history
  • Loading branch information
robhudson committed Oct 27, 2013
1 parent 21c9741 commit b592289
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion readthedocs/restapi/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -202,7 +202,7 @@ def search(request):
}
}
}
results = PageIndex().search(body)
results = PageIndex().search(body, routing=project_id)

else:
body = {
Expand Down
4 changes: 2 additions & 2 deletions readthedocs/search/indexes.py
Original file line number Diff line number Diff line change
Expand Up @@ -181,9 +181,9 @@ def update_aliases(self, new_index, delete=True):
if delete and old_index:
self.es.indices.delete(index=old_index)

def search(self, body):
def search(self, body, **kwargs):
return self.es.search(index=self._index, doc_type=self._type,
body=body)
body=body, **kwargs)


class Project(Index):
Expand Down

0 comments on commit b592289

Please sign in to comment.