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

Refactor SearchSource interface #20334

Merged
merged 18 commits into from
Jul 3, 2018

Conversation

cjcenizal
Copy link
Contributor

@cjcenizal cjcenizal commented Jun 29, 2018

This PR consists largely of interface changes and some minor internal changes to make the code a bit clearer. Reviewing one commit at a time should make the changes easier to digest.

  • I removed the dynamically assigned type, query, filter, sort, highlight, highlightAll, aggs, from, searchAfter, size, source, version, and fields methods.
  • The accessor interface now consists of getValue and setValue methods which throw errors if an unrecognized property name is provided, in addition to setIndexPattern, getData, setData, getOwnValue, and getId methods.
  • Linked-list interface now consists of setParent and getParent.
  • Factory interface now consists of create, createCopy, and createChild.
  • I removed the unused unused enable, disable, and addFilterPredicate, and the redundant toString (method only used internally) and extend method (superseded by createChild).

Internally, I renamed the _state property to _data and grouped methods by concern.

@cjcenizal cjcenizal added chore WIP Work in progress Team:Core Core services & architecture: plugins, logging, config, saved objects, http, ES client, i18n, etc v7.0.0 v6.4.0 labels Jun 29, 2018
@elasticmachine
Copy link
Contributor

💔 Build Failed

@cjcenizal cjcenizal force-pushed the refactor-search-source branch from 944bffd to f802938 Compare June 29, 2018 04:00
@elasticmachine
Copy link
Contributor

💔 Build Failed

@cjcenizal cjcenizal force-pushed the refactor-search-source branch 2 times, most recently from f3c9e36 to 455d51c Compare June 29, 2018 05:01
@elasticmachine
Copy link
Contributor

💔 Build Failed

@cjcenizal cjcenizal force-pushed the refactor-search-source branch from 455d51c to 890b4ed Compare June 29, 2018 12:44
@elasticmachine
Copy link
Contributor

💔 Build Failed

@cjcenizal cjcenizal force-pushed the refactor-search-source branch from 890b4ed to a8a5bd0 Compare June 29, 2018 14:02
@elasticmachine
Copy link
Contributor

💔 Build Failed

@cjcenizal cjcenizal force-pushed the refactor-search-source branch 2 times, most recently from 0c77b46 to 2f848c7 Compare June 29, 2018 15:41
@elasticmachine
Copy link
Contributor

💔 Build Failed

@cjcenizal cjcenizal force-pushed the refactor-search-source branch from 2f848c7 to 03e8982 Compare June 29, 2018 17:15
@elasticmachine
Copy link
Contributor

💔 Build Failed

@cjcenizal cjcenizal force-pushed the refactor-search-source branch from 03e8982 to d1596ed Compare June 29, 2018 18:56
@cjcenizal
Copy link
Contributor Author

Retest

@cjcenizal cjcenizal force-pushed the refactor-search-source branch from d1596ed to 60ab3c9 Compare June 29, 2018 19:47
@elasticmachine
Copy link
Contributor

💚 Build Succeeded

@elasticmachine
Copy link
Contributor

💔 Build Failed

@cjcenizal cjcenizal force-pushed the refactor-search-source branch from cb792f3 to 3713c31 Compare June 30, 2018 00:54
@elasticmachine
Copy link
Contributor

💔 Build Failed

@cjcenizal cjcenizal force-pushed the refactor-search-source branch from fdf0082 to 85b0f28 Compare June 30, 2018 02:40
@elasticmachine
Copy link
Contributor

💚 Build Succeeded

@elasticmachine
Copy link
Contributor

💚 Build Succeeded

Copy link
Contributor

@jen-huang jen-huang left a comment

Choose a reason for hiding this comment

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

Tested various visualizations, saved searches, and dashboards. Didn't see anything broken.

LGTM!

@elasticmachine
Copy link
Contributor

💔 Build Failed

@cjcenizal cjcenizal force-pushed the refactor-search-source branch from ad6b2b5 to 9e3f6a9 Compare July 3, 2018 21:27
@cjcenizal cjcenizal force-pushed the refactor-search-source branch from 9e3f6a9 to 1c431c7 Compare July 3, 2018 22:40
@elasticmachine
Copy link
Contributor

💔 Build Failed

@elasticmachine
Copy link
Contributor

💚 Build Succeeded

@cjcenizal cjcenizal merged commit e024d3d into elastic:master Jul 3, 2018
@cjcenizal cjcenizal deleted the refactor-search-source branch July 3, 2018 23:53
cjcenizal added a commit that referenced this pull request Jul 3, 2018
* Removed the dynamically assigned type, query, filter, sort, highlight, highlightAll, aggs, from, searchAfter, size, source, version, and fields methods.
* The accessor interface now consists of getField and setField methods which throw errors if an unrecognized property name is provided, in addition to getFields, setFields, getOwnField, and getId methods.
* Linked-list interface now consists of setParent and getParent.
* Factory interface now consists of create, createCopy, and createChild.
* Removed the unused unused enable, disable, and addFilterPredicate, and the redundant toString (method only used internally) and extend method (superseded by createChild).
* Internally, renamed the _state property to _data and grouped methods by concern.
cjcenizal added a commit to cjcenizal/kibana that referenced this pull request Jul 3, 2018
* Removed the dynamically assigned type, query, filter, sort, highlight, highlightAll, aggs, from, searchAfter, size, source, version, and fields methods.
* The accessor interface now consists of getField and setField methods which throw errors if an unrecognized property name is provided, in addition to getFields, setFields, getOwnField, and getId methods.
* Linked-list interface now consists of setParent and getParent.
* Factory interface now consists of create, createCopy, and createChild.
* Removed the unused unused enable, disable, and addFilterPredicate, and the redundant toString (method only used internally) and extend method (superseded by createChild).
* Internally, renamed the _state property to _data and grouped methods by concern.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
chore Team:Core Core services & architecture: plugins, logging, config, saved objects, http, ES client, i18n, etc v6.4.0 v7.0.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants