Skip to content

Conversation

@iverase
Copy link
Contributor

@iverase iverase commented Aug 20, 2018

For consistency with stored_fields, docvalue_fields should support the use of wildcards.

See also: #26390

Closes #26299

For consistency with stored_fields, docvalue_fields should support the use of wildcards.

See also: elastic#26390

Closes elastic#26299
@iverase iverase added >enhancement :Search/Search Search-related issues that do not fall into other categories v7.0.0 v6.5.0 labels Aug 20, 2018
@iverase iverase self-assigned this Aug 20, 2018
@iverase iverase requested a review from jpountz August 20, 2018 10:04
@elasticmachine
Copy link
Collaborator

Pinging @elastic/es-search-aggs

Copy link
Contributor

@jimczi jimczi left a comment

Choose a reason for hiding this comment

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

Thanks @iverase , it looks good overall.
I left a comment regarding the error message when too many docvalue_fields are requested. Can you also update the documentation to explain this new behavior in:
docs/reference/search/request/docvalue-fields.asciidoc ?

+ "] but was [" + source.docValueFields().size() + "]. This limit can be set by changing the ["
+ IndexSettings.MAX_DOCVALUE_FIELDS_SEARCH_SETTING.getKey() + "] index level setting.");
"Trying to retrieve too many docvalue_fields. Must be less than or equal to: [" + maxAllowedDocvalueFields
+ "] but was [" + source.docValueFields().size() + "]. This limit can be set by changing the ["
Copy link
Contributor

Choose a reason for hiding this comment

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

Should it be docValueFields().size() since source.docValueFields().size() contains the patterns ?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

You are totally right :)

Copy link
Contributor

@jpountz jpountz left a comment

Choose a reason for hiding this comment

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

LGTM, I only left a comment about the docs snippet.

"docvalue_fields" : [
{
"field": "*field", <1>
"format": "use_field_mapping" <2>
Copy link
Contributor

Choose a reason for hiding this comment

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

This option is deprecated in 7.x so I suspect this will make the docs tests fail. We could do just docvalue_fields: [ "*field" ].

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Shall I update the docs or this should be addressed in a different issue?

Copy link
Contributor

Choose a reason for hiding this comment

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

Sorry this is my bad, I assumed that #30831 had been merged, which is not true. There is nothing to fix in your PR.

@iverase iverase merged commit d7219c0 into elastic:master Aug 23, 2018
iverase added a commit that referenced this pull request Aug 23, 2018
* Search: Support of wildcard on docvalue_fields

For consistency with stored_fields, docvalue_fields should support the use of wildcards. 
Documentation of doc values fields is updated accordingly.

See also: #26390

Closes #26299
martijnvg added a commit that referenced this pull request Aug 24, 2018
* es/master: (62 commits)
  [DOCS] Add docs for Application Privileges (#32635)
  Add versions 5.6.12 and 6.4.1
  Do NOT allow termvectors on nested fields (#32728)
  [Rollup] Return empty response when aggs are missing (#32796)
  [TEST] Add some ACL yaml tests for Rollup (#33035)
  Move non duplicated actions back into xpack core (#32952)
  Test fix - GraphExploreResponseTests should not randomise array elements Closes #33086
  Use `addIfAbsent` instead of checking if an element is contained
  TESTS: Fix Random Fail in MockTcpTransportTests (#33061)
  HLRC: Fix Compile Error From Missing Throws (#33083)
  [DOCS] Remove reload password from docs cf. #32889
  HLRC: Add ML Get Buckets API (#33056)
  Watcher: Improve error messages for CronEvalTool (#32800)
  Search: Support of wildcard on docvalue_fields (#32980)
  Change query field expansion (#33020)
  INGEST: Cleanup Redundant Put Method (#33034)
  SQL: skip uppercasing/lowercasing function tests for AZ locales as well (#32910)
  Fix the default pom file name (#33063)
  Switch ml basic tests to new style Requests (#32483)
  Switch some watcher tests to new style Requests (#33044)
  ...
martijnvg added a commit that referenced this pull request Aug 24, 2018
* es/6.x: (58 commits)
  [DOCS] Add docs for Application Privileges (#32635)
  Add versions 5.6.12 and 6.4.1
  [Rollup] Return empty response when aggs are missing (#32796)
  [TEST] Add some ACL yaml tests for Rollup (#33035)
  Test fix - GraphExploreResponseTests should not randomise array elements Closes #33086
  Use `addIfAbsent` instead of checking if an element is contained
  HLRC: Fix Compile Error From Missing Throws (#33083)
  [DOCS] Remove reload password from docs cf. #32889
  Use a dedicated ConnectionManger for RemoteClusterConnection (#32988)
  Watcher: Improve error messages for CronEvalTool (#32800)
  HLRC: Add ML Get Buckets API (#33056)
  Change query field expansion (#33020)
  Search: Support of wildcard on docvalue_fields (#32980)
  Add beta label to MSI on install Elasticsearch page (#28126)
  SQL: skip uppercasing/lowercasing function tests for AZ locales as well (#32910)
  [DOCS] Drafts Elasticsearch 6.4.0 release notes (#33039)
  Fix the default pom file name (#33063)
  Fix backport of switch ml basic tests to new style Requests (#32483)
  Switch ml basic tests to new style Requests (#32483)
  Switch some watcher tests to new style Requests (#33044)
  ...
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.0 v7.0.0-beta1

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants