Skip to content

Conversation

@mythmon
Copy link
Contributor

@mythmon mythmon commented Feb 5, 2015

This makes the search suggestion do two separate queries for data, which fixes that goofy thing they did to try and get enough of both document types. It also switches to pulling the questions from the DB and using the API serializer. This increases consistency with the rest of the API, and provides some data to BuddyUp that is needed for their UX that isn't in ES.

r?

@rlr
Copy link
Contributor

rlr commented Feb 6, 2015

I like the refactor. Tests are happy. r+

rlr added a commit that referenced this pull request Feb 6, 2015
…ta-1123420

[Bug 1123420, 1122539] Refactor and improve search suggestion APIs.
@rlr rlr merged commit a071dea into mozilla:master Feb 6, 2015
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You might want a:

if max_results == 0:
    return []

That way if the max is 0, it's (almost) a no-op.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Bah--I just noticed this got merged already. I can do a PR with this change if you like.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That sounds like a good change, go for it! Thanks for looking at this.

@willkg
Copy link
Member

willkg commented Feb 6, 2015

The "max_* thing could be 0" thing is in a PR: #2352

@mythmon mythmon deleted the search-suggest-more-question-data-1123420 branch June 17, 2015 20:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants