When I add the "constant score" bit the "fields" do not return. Only
_source. Removing the constant score exists bit, the six fields above
return without issue.
It isn't the end of the world for me to return the entire document in this
case, I was just wondering what the deal is with this and if there is
something I'm doing wrong.
You would need to combine your two filters with a bool filter:
The constant score query should be at the top level and the exists/term
filters should be combined with a bool filter underneath it. The constant
score wrapper is not really necessary since your filters are not doing any
scoring, so you can just skip it and use the bool filter.
When I add the "constant score" bit the "fields" do not return. Only
_source. Removing the constant score exists bit, the six fields above
return without issue.
It isn't the end of the world for me to return the entire document in this
case, I was just wondering what the deal is with this and if there is
something I'm doing wrong.
Apache, Apache Lucene, Apache Hadoop, Hadoop, HDFS and the yellow elephant
logo are trademarks of the
Apache Software Foundation
in the United States and/or other countries.