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

include mrview options in _explain result #765

Merged
merged 1 commit into from Sep 4, 2017

Conversation

willholley
Copy link
Member

Overview

_explain previously returned the options passed in by the user but
not those modified at execution time by Mango. Now we include
index-specific options (mrargs for map/reduce indexes) in the output,
allowing us to see e.g. when include_docs was used.

Testing recommendations

Manually test by making a request to the _explain endpoint from the command line / Fauxton. When a query is fulfilled by a json index, you should see an mrargs field in the output.

Unit tests should provide good coverage.

GitHub issue number

Related Pull Requests

Checklist

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

@willholley willholley force-pushed the mango_explain_view_parameters branch from b458de2 to ec5f24e Compare August 21, 2017 14:58
{end_key, mango_idx:end_key(Idx, Ranges)}
]}}]
end.

Copy link
Contributor

Choose a reason for hiding this comment

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

Previous implementation returned range property as well. We don't return it anymore. Would it be a problem for fauxton?

Copy link
Member Author

Choose a reason for hiding this comment

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

fauxton just displays the raw JSON result from _explain, so it won't be a problem. The range property is now part of the mrargs object in the result.

Copy link
Contributor

@iilyak iilyak left a comment

Choose a reason for hiding this comment

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

I have a question about compatibility with fauxton. Tests pass locally though.

nosetests -vv test/02-basic-find-test.py
....
test_explain_view_args (02-basic-find-test.BasicFindTests) ... ok
...
-------------------------------------------------------
Ran 22 tests in 2.796s

OK

_explain previously returned the options passed in by the user but
not those modified at execution time by Mango. Now we include
index-specific options (mrargs for map/reduce indexes) in the output,
allowing us to see e.g. when include_docs was used.
Copy link
Member

@garrensmith garrensmith left a comment

Choose a reason for hiding this comment

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

Looks good to me

@willholley willholley merged commit 3d0e4f4 into apache:master Sep 4, 2017
@willholley willholley deleted the mango_explain_view_parameters branch September 4, 2017 13:31
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

3 participants