Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

Already on GitHub? Sign in to your account

AO3-5264: Set operator for bookmark search #3195

Merged
merged 1 commit into from Dec 2, 2017

Conversation

Projects
None yet
5 participants
Owner

elzj commented Dec 2, 2017

Issue

https://otwarchive.atlassian.net/browse/AO3-5264

Purpose

Fixes bookmark search to use 'AND' as the default operator, to match other search behavior.

Testing

Bookmark searches for multiple words/terms should return results that match all of them, not any one of them.

@@ -5,7 +5,7 @@
it "should allow you to perform a simple search" do
q = BookmarkQuery.new(query: "unicorns")
search_body = q.generated_query
- expect(search_body[:query][:bool][:should]).to include({:query_string => { :query => "unicorns" }})
+ expect(search_body[:query][:bool][:should]).to include({ query_string: { query: "unicorns", default_operator: "AND" }})
@houndci-bot

houndci-bot Dec 2, 2017

Redundant curly braces around a hash parameter.
Space inside } missing.

Looks good to me!

@otw-deploy otw-deploy merged commit dc3426c into otwcode:master Dec 2, 2017

4 checks passed

Scrutinizer 8 new issues, 1 updated code elements
Details
codeclimate All good!
Details
continuous-integration/travis-ci/pr The Travis CI build passed
Details
hound 2 violations found.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment