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

has_parent builder: exception message/param fix #31182

Merged
merged 1 commit into from
Jun 30, 2018

Conversation

nirmalc
Copy link
Contributor

@nirmalc nirmalc commented Jun 7, 2018

has_parent builder throws exception message that it expects a type
while parser excepts parent_type

@colings86 colings86 added the :Search/Search Search-related issues that do not fall into other categories label Jun 11, 2018
@elasticmachine
Copy link
Collaborator

Pinging @elastic/es-search-aggs

Copy link
Contributor

@jtibshirani jtibshirani left a comment

Choose a reason for hiding this comment

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

Thanks @nirmalc for the fix! I left a small comment.

@@ -74,7 +74,7 @@ public HasParentQueryBuilder(String type, QueryBuilder query, boolean score) {
}

private HasParentQueryBuilder(String type, QueryBuilder query, boolean score, InnerHitBuilder innerHitBuilder) {
this.type = requireValue(type, "[" + NAME + "] requires 'type' field");
this.type = requireValue(type, "[" + NAME + "] requires 'parent_type' field");
Copy link
Contributor

Choose a reason for hiding this comment

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

To avoid this getting out-of-sync in the future, it would be nice to use PARENT_TYPE_FIELD.getPreferredName() instead of hard-coding parent_type. The same idea applies to query below.

has_parent builder throws exception message that it expects a `type`
while parser excepts `parent_type`
@nirmalc nirmalc force-pushed the has_parentExceptionMessage branch from 4aa0e42 to 870a90f Compare June 30, 2018 00:37
@nirmalc
Copy link
Contributor Author

nirmalc commented Jun 30, 2018

Thanks for review, I've updated and rebased with latest master

@jtibshirani
Copy link
Contributor

@elasticmachine test this please

@jtibshirani jtibshirani merged commit c827a4e into elastic:master Jun 30, 2018
jasontedor added a commit that referenced this pull request Jul 1, 2018
* elastic/master:
  Enable setting client path prefix to / (#30119)
  [DOCS] Secure settings specified per node (#31621)
  has_parent builder: exception message/param fix (#31182)
jasontedor added a commit to martijnvg/elasticsearch that referenced this pull request Jul 1, 2018
* elastic/ccr: (30 commits)
  Enable setting client path prefix to / (elastic#30119)
  [DOCS] Secure settings specified per node (elastic#31621)
  has_parent builder: exception message/param fix (elastic#31182)
  TEST: Randomize soft-deletes settings (elastic#31585)
  Mute 'Test typed keys parameter for suggesters' as we await a fix.
  Build test: Thread linger
  Fix gradle4.8 deprecation warnings (elastic#31654)
  Mute FileRealmTests#testAuthenticateCaching with an @AwaitsFix.
  Mute TransportChangePasswordActionTests#testIncorrectPasswordHashingAlgorithm with an @AwaitsFix.
  Build: Fix naming conventions task   (elastic#31681)
  Introduce a Hashing Processor (elastic#31087)
  Do not check for object existence when deleting repository index files (elastic#31680)
  Remove extra check for object existence in repository-gcs read object (elastic#31661)
  Support multiple system store types (elastic#31650)
  [Test] Clean up some repository-s3 tests (elastic#31601)
  [Docs] Use capital letters in section headings (elastic#31678)
  muted tests that will be replaced by the shard follow task refactoring: elastic#31581
  [DOCS] Add PQL language Plugin (elastic#31237)
  Merge AzureStorageService and AzureStorageServiceImpl and clean up tests (elastic#31607)
  TEST: Fix test task invocation (elastic#31657)
  ...
jimczi pushed a commit that referenced this pull request Nov 9, 2018
has_parent builder throws exception message that it expects a `type`
while parser excepts `parent_type`
jimczi pushed a commit that referenced this pull request Nov 9, 2018
has_parent builder throws exception message that it expects a `type`
while parser excepts `parent_type`
@jimczi
Copy link
Contributor

jimczi commented Nov 9, 2018

The issue is still on 6x so I pushed the fix for this version (also in 6.5.1).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
>enhancement :Search/Search Search-related issues that do not fall into other categories v6.5.1 v6.6.0 v7.0.0-beta1
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants