Do not execute all searches on all indexes
abeglova opened this issue · 0 comments
abeglova commented
We currently execute all searches against all indexes including comment, post, stafflist, etc
https://github.com/mitodl/open-discussions/blob/master/search/api.py#L305
Then filter to just the relevant resource type with an object_type filter. All elements in each index have the same value for object_type.
Since we have an index per resource type we can probably improve search performance by only searching the relevant resource type indexes when we do searches.