Skip to content
New issue

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

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix user-specified ddoc name in Mango #961

Merged
merged 1 commit into from
Nov 3, 2017

Conversation

willholley
Copy link
Member

@willholley willholley commented Nov 3, 2017

Overview

When creating a Mango index, we allow the user to specify
a design document name. This can be of the form "_design/foo"
or just "foo", with the expectation that Mango would
automatically add the "_design" prefix.

This fixes a bug whereby if the user specified "_design/foo",
Mango was prefixing this again, creating a design document called
"_design/_design/foo".

Testing recommendations

Added a couple of new eunit tests to cover this. To test manually, verify that you can create a mango index using the "ddoc" field to specify the design document id, with and without a "_design/" prefix.

Checklist

  • Code is written and works correctly;
  • Changes are covered by tests;
  • Documentation reflects the changes;

When creating a Mango index, we allow the user to specify
a design document name. This can be of the form "_design/foo"
or just "foo", with the expectation that Mango would
automatically add the "_design" prefix.

This fixes a bug whereby if the user specified "_design/foo",
Mango was prefixing this again, creating a design document called
"_design/_design/foo".
@willholley willholley merged commit 436b402 into apache:master Nov 3, 2017
@willholley willholley deleted the mango_extract_ddoc branch November 3, 2017 14:14
willholley added a commit to willholley/couchdb that referenced this pull request May 22, 2018
When creating a Mango index, we allow the user to specify
a design document name. This can be of the form "_design/foo"
or just "foo", with the expectation that Mango would
automatically add the "_design" prefix.

This fixes a bug whereby if the user specified "_design/foo",
Mango was prefixing this again, creating a design document called
"_design/_design/foo".
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.

None yet

2 participants