Field Alias error when used in collapse query #32623
Labels
>bug
:Search Foundations/Mapping
Index mappings, including merging and defining field types
Team:Search Foundations
Meta label for the Search Foundations team in Elasticsearch
v7.0.0-beta1
Elasticsearch version : 7.x
Plugins installed: none
JVM version: java version "10" 2018-03-20
OS version: 17.4.0 Darwin Kernel Version 17.4.0: Sun Dec 17 09:19:54 PST 2017; root:xnu-4570.41.2~1/RELEASE_X86_64 x86_64
Description of the problem including expected versus actual behavior:
Collapsing on a field alias returns an NPE, rather than the expected result of the collapse as applied to the field pointed to via the alias' path.
Steps to reproduce:
Bring up a local instance of elasticsearch, running latest
master
.Index some docs using python script attached (you may need to
pip install elasticsearch
,pip install faker
for the script to work. Note thatpostal_code
is a field alias, pointing tozip_code
, a long. populate.py.gzRun the following query
Observe the error.
zip_code
field insteadThis query returns results as expected.
Provide logs (if relevant): The stacktrace for the error in step 2 is below.
The text was updated successfully, but these errors were encountered: