Skip to content

Commit

Permalink
Reduced response time in nearby People search API (#9940)
Browse files Browse the repository at this point in the history
* reduced response time in nearby People search api

* reformatted previous commit
  • Loading branch information
17sushmita authored Jul 27, 2021
1 parent 9d6af3c commit 40b8c78
Showing 1 changed file with 1 addition and 5 deletions.
6 changes: 1 addition & 5 deletions app/services/search_service.rb
Original file line number Diff line number Diff line change
Expand Up @@ -204,11 +204,7 @@ def tagNearbyPeople(coordinates, tag, field, period = nil, sort_by = nil, order_
items = user_locations

# selects the items whose node_tags don't have the location:blurred tag
items.select do |item|
item.user_tags.none? do |user_tag|
user_tag.name == "location:blurred"
end
end
items = items.where('user_tags.value <> "location:blurred"')

# Here we use period["from"] and period["to"] in the query only if they have been specified,
# so we avoid to join revision table
Expand Down

0 comments on commit 40b8c78

Please sign in to comment.