-
Notifications
You must be signed in to change notification settings - Fork 25.6k
Closed
Labels
Description
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());