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

Package should prefer _selector filters over JavaScript filter functions #138

Open
willholley opened this issue Oct 27, 2017 · 0 comments
Open

Comments

@willholley
Copy link
Member

Cloudant / CouchDB has supported using Query selectors as an alternative to JavaScript filter functions for over a year. Query selectors have a significant performance advantage over using JavaScript filters - they can be roughly an order of magnitude more efficient - and do not require users to inject a design document prior to reading changes.

The OpenWhisk package should strongly push users towards using Query selectors in favour of JS functions. Essentially the changes would be:

  • use filter=_selector instead of asking users to specify a design doc/filter
  • make a POST request to _changes instead of GET
  • in the request body, include a "selector" field containing the Query selector to match documents against.
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

No branches or pull requests

1 participant