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

Field Collapsing: Version is not visible for inner_hits #27822

Closed
KarstenRauch opened this issue Dec 14, 2017 · 1 comment
Closed

Field Collapsing: Version is not visible for inner_hits #27822

KarstenRauch opened this issue Dec 14, 2017 · 1 comment
Labels

Comments

@KarstenRauch
Copy link

Elasticsearch version: 6.1 and below

Steps to reproduce:

Search with the example
https://www.elastic.co/guide/en/elasticsearch/reference/current/search-request-collapse.html#_expand_collapse_results
but set
"inner_hits":{ "version":true, ... }
Expected:
In the result "hits" below "inner_hits" is a field "_version".
Instead the result is the same as for "version":false,.

Test-Case:
InnerHitsCollapseIT.java.txt

Solution:

Add one extra line 168 in /_core/java/org/elasticsearch/action/search/ExpandSearchPhase.java
(Method org.elasticsearch.action.search.ExpandSearchPhase.buildExpandSearchSourceBuilder(InnerHitBuilder) ):
groupSource.version(options.isVersion());

@KarstenRauch
Copy link
Author

"version":true, does not work for inner hits in case of field collapsing, but it works for other inner hit results like nested documents.

@jimczi jimczi added help wanted adoptme >bug good first issue low hanging fruit labels Dec 14, 2017
liketic added a commit to liketic/elasticsearch that referenced this issue Dec 15, 2017
jimczi pushed a commit that referenced this issue Dec 15, 2017
Add version support for inner hits in field collapsing
jimczi pushed a commit that referenced this issue Dec 15, 2017
Add version support for inner hits in field collapsing
jimczi pushed a commit that referenced this issue Dec 15, 2017
Add version support for inner hits in field collapsing
martijnvg added a commit that referenced this issue Dec 18, 2017
* es/6.x: (170 commits)
  Allow TrimFilter to be used in custom normalizers (#27758)
  recovery from snapshot should fill gaps (#27850)
  Remove unused class PreBuiltTokenFilters (#27839)
  Reject scroll query if size is 0 (#22552) (#27842)
  Mutes ‘Rollover no condition matched’ YAML test
  Make randomNonNegativeLong() draw from a uniform distribution (#27856)
  Adapt rest test after backport. Relates #27833
  Handle case where the hole vertex is south of the containing polygon(s) (#27685)
  Move range field mapper back to core
  Fix publication of elasticsearch-cli to Maven
  Do not use system properties when building the HttpAsyncClient (#27829)
  Optimize version map for append-only indexing (#27752)
  Add NioGroup for use in different transports (#27737)
  adapt field collapsing skip test version. relates #27833
  Add version support for inner hits in field collapsing (#27822) (#27833)
  Clarify that number of threads is set by packages
  Register HTTP read timeout setting
  Fixes Checkstyle
  Remove `operationThreaded` from Java API (#27836)
  Fixes failing BytesSizeValues tests
  ...
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants