<p dir="auto">Elasticsearch version 5.0 Alpha-2</p>
<p dir="auto">JVM version 1.8.0_91</p>
<p dir="auto">OS version Windows 7</p>
<p dir="auto"><strong>Description of the problem including expected versus actual behavior</strong>:<br>
Lucene throws the following error when running the Date Range query below. Files to reproduce are attached.</p>
<p dir="auto">IllegalArgumentException[field="inceptionDate" is unrecognized];<br>
Caused by: java.lang.IllegalArgumentException: field="inceptionDate" is unrecognized<br>
at org.apache.lucene.codecs.lucene60.Lucene60PointsReader.getBKDReader(Lucene60PointsReader.java:120).</p>
<ol dir="auto">
<li>
<p dir="auto">Schema included in mapping.txt file</p>
</li>
<li>
<p dir="auto">ES dump included in dump.txt</p>
</li>
<li>
<p dir="auto">stack trace in log.txt<br>
{<br>
"query" : {<br>
"range" : {<br>
<a href="https://github.com/elastic/elasticsearch/files/273652/log.txt">log.txt</a><br>
<a href="https://github.com/elastic/elasticsearch/files/273651/mapping.txt">mapping.txt</a><br>
<a href="https://github.com/elastic/elasticsearch/files/273653/dump.txt">dump.txt</a></p>
<p dir="auto">"inceptionDate" : {<br>
"from" : "10/1/1980",<br>
"to" : "12/31/2015",<br>
"include_lower" : true,<br>
"include_upper" : true,<br>
"boost" : 1.0<br>
}<br>
}<br>
},<br>
"fields" : [ "orgType", "inceptionDate", "name", "id", "qualityRating", "version", "parentId", "descp" ]<br>
}<br>
<strong>Provide logs (if relevant)</strong>:</p>
</li>
</ol>

<p dir="auto"><strong>Describe the feature</strong>:</p>
<p dir="auto">The static helpers on PointValues throws an exception if a leaf has points indexed but not for the given field.<br>
When using this function in es the exception is never caught which could lead to error in search request or field stats request.<br>
The problem has been fixed in Lucene: <a href="https://issues.apache.org/jira/browse/LUCENE-7257" rel="nofollow">https://issues.apache.org/jira/browse/LUCENE-7257</a> but we agreed with <a class="user-mention notranslate" data-hovercard-type="user" data-hovercard-url="/users/jpountz/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="https://github.com/jpountz">@jpountz</a> that we should have a temporary fix in es that we could remove afterward.<br>
The proposal is to have a XPointValues which acts exactly like the PointValues with the LUCENE-7257 patch and to use this class to call all the static helpers in es.</p>