<p dir="auto">when i Click “visualize” and then ,display error "Visualize:java.lang.lllegalStateException:Field daVisualize",or i used dashboard module ,before logstash auto update index,it was normal;when time is 8:00 am,dashboard module will not work,and display the error.</p>
<p dir="auto">error details:</p>
<p dir="auto">1.kibana page error:<br>
Error: Request to Elasticsearch failed: {"error":{"root_cause":[{"type":"exception","reason":"java.lang.IllegalStateException: Field data loading is forbidden on path"}],"type":"search_phase_execution_exception","reason":"all shards failed","phase":"query","grouped":true,"failed_shards":[{"shard":0,"index":"logstash-2015.11.29","node":"ODyds4KgQsqrxczx1ana8A","reason":{"type":"exception","reason":"java.lang.IllegalStateException: Field data loading is forbidden on path","caused_by":{"type":"unchecked_execution_exception","reason":"java.lang.IllegalStateException: Field data loading is forbidden on path","caused_by":{"type":"illegal_state_exception","reason":"Field data loading is forbidden on path"}}}}]}} KbnError@<a href="http://www.xxx.cn:80/bundles/c" rel="nofollow">http://www.xxx.cn:80/bundles/c</a> ... 64:30 RequestFailure@<a href="http://www.xxx.cn:80/bundles/c" rel="nofollow">http://www.xxx.cn:80/bundles/c</a> ... 97:19 <a href="http://www.xxx.cn:80/bundles/k" rel="nofollow">http://www.xxx.cn:80/bundles/k</a> ... 05:57 <a href="http://www.xxx.cn:80/bundles/c" rel="nofollow">http://www.xxx.cn:80/bundles/c</a> ... 91:28 <a href="http://www.xxx.cn:80/bundles/c" rel="nofollow">http://www.xxx.cn:80/bundles/c</a> ... 60:31 map@[native code] map@<a href="http://www.xxx.cn:80/bundles/c" rel="nofollow">http://www.xxx.cn:80/bundles/c</a> ... 59:34 callResponseHandlers@<a href="http://www.xxx.cn:80/bundles/k" rel="nofollow">http://www.xxx.cn:80/bundles/k</a> ... 77:26 <a href="http://www.xxx.cn:80/bundles/k" rel="nofollow">http://www.xxx.cn:80/bundles/k</a> ... 84:37 processQueue@<a href="http://www.xxx.cn:80/bundles/c" rel="nofollow">http://www.xxx.cn:80/bundles/c</a> ... 09:31 <a href="http://www.xxx.cn:80/bundles/c" rel="nofollow">http://www.xxx.cn:80/bundles/c</a> ... 25:40 $eval@<a href="http://www.xxx.cn:80/bundles/c" rel="nofollow">http://www.xxx.cn:80/bundles/c</a> ... 53:29 $digest@<a href="http://www.xxx.cn:80/bundles/c" rel="nofollow">http://www.xxx.cn:80/bundles/c</a> ... 64:37 $apply@<a href="http://www.xxx.cn:80/bundles/c" rel="nofollow">http://www.xxx.cn:80/bundles/c</a> ... 61:32 done@<a href="http://www.xxx.cn:80/bundles/c" rel="nofollow">http://www.xxx.cn:80/bundles/c</a> ... 10:54 completeRequest@<a href="http://www.xxx.cn:80/bundles/c" rel="nofollow">http://www.xxx.cn:80/bundles/c</a> ... 08:16 requestLoaded@<a href="http://www.xxx.cn:80/bundles/commons.bundle.js:37749:25" rel="nofollow">http://www.xxx.cn:80/bundles/commons.bundle.js:37749:25</a></p>
<p dir="auto">2.elasticsearch error log:</p>
<p dir="auto">[2015-11-30 00:04:53,395][DEBUG][action.search.type       ] [Thumbelina] [logstash-2015.11.29][2], node[acrTX4O0RciN8ppbSdfoww], [P], v[4], s[STARTED], a[id=ogwkZP0yQCCgatW0_tnvnw]: Failed to execute [org.elasticsearch.action.search.SearchRequest@aef2ffe] lastShard [true]<br>
RemoteTransportException[[Thumbelina][192.168.1.76:9300][indices:data/read/search[phase/query]]]; nested: QueryPhaseExecutionException[Query Failed [Failed to execute main query]]; nested: ElasticsearchException[java.lang.IllegalStateException: Field data loading is forbidden on response]; nested: UncheckedExecutionException[java.lang.IllegalStateException: Field data loading is forbidden on response]; nested: IllegalStateException[Field data loading is forbidden on response];<br>
Caused by: QueryPhaseExecutionException[Query Failed [Failed to execute main query]]; nested: ElasticsearchException[java.lang.IllegalStateException: Field data loading is forbidden on response]; nested: UncheckedExecutionException[java.lang.IllegalStateException: Field data loading is forbidden on response]; nested: IllegalStateException[Field data loading is forbidden on response];<br>
at org.elasticsearch.search.query.QueryPhase.execute(QueryPhase.java:343)<br>
at org.elasticsearch.search.query.QueryPhase.execute(QueryPhase.java:106)<br>
at org.elasticsearch.search.SearchService.loadOrExecuteQueryPhase(SearchService.java:363)<br>
at org.elasticsearch.search.SearchService.executeQueryPhase(SearchService.java:375)<br>
at org.elasticsearch.search.action.SearchServiceTransportAction$SearchQueryTransportHandler.messageReceived(SearchServiceTransportAction.java:368)<br>
at org.elasticsearch.search.action.SearchServiceTransportAction$SearchQueryTransportHandler.messageReceived(SearchServiceTransportAction.java:365)<br>
at org.elasticsearch.shield.transport.ShieldServerTransportService$ProfileSecuredRequestHandler.messageReceived(ShieldServerTransportService.java:165)<br>
at org.elasticsearch.transport.TransportService$4.doRun(TransportService.java:350)<br>
at org.elasticsearch.common.util.concurrent.AbstractRunnable.run(AbstractRunnable.java:37)<br>
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)<br>
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)<br>
at java.lang.Thread.run(Thread.java:745)<br>
Caused by: ElasticsearchException[java.lang.IllegalStateException: Field data loading is forbidden on response]; nested: UncheckedExecutionException[java.lang.IllegalStateException: Field data loading is forbidden on response]; nested: IllegalStateException[Field data loading is forbidden on response];<br>
at org.elasticsearch.index.fielddata.plain.AbstractIndexFieldData.load(AbstractIndexFieldData.java:82)<br>
at org.elasticsearch.search.aggregations.support.ValuesSource$Bytes$FieldData.bytesValues(ValuesSource.java:195)<br>
at org.elasticsearch.search.aggregations.bucket.terms.StringTermsAggregator.getLeafCollector(StringTermsAggregator.java:73)<br>
at org.elasticsearch.search.aggregations.AggregatorBase.getLeafCollector(AggregatorBase.java:132)<br>
at org.elasticsearch.search.aggregations.AggregatorBase.getLeafCollector(AggregatorBase.java:38)<br>
at org.apache.lucene.search.MultiCollector.getLeafCollector(MultiCollector.java:117)<br>
at org.apache.lucene.search.IndexSearcher.search(IndexSearcher.java:763)<br>
at org.apache.lucene.search.IndexSearcher.search(IndexSearcher.java:486)<br>
at org.elasticsearch.search.query.QueryPhase.execute(QueryPhase.java:324)<br>
... 11 more<br>
Vian  00:18:36<br>
Caused by: com.google.common.util.concurrent.UncheckedExecutionException: java.lang.IllegalStateException: Field data loading is forbidden on response<br>
at com.google.common.cache.LocalCache$Segment.get(LocalCache.java:2203)<br>
at com.google.common.cache.LocalCache.get(LocalCache.java:3937)<br>
at com.google.common.cache.LocalCache$LocalManualCache.get(LocalCache.java:4739)<br>
at org.elasticsearch.indices.fielddata.cache.IndicesFieldDataCache$IndexFieldCache.load(IndicesFieldDataCache.java:156)<br>
at org.elasticsearch.index.fielddata.plain.AbstractIndexFieldData.load(AbstractIndexFieldData.java:76)<br>
… 19 more<br>
Caused by: java.lang.IllegalStateException: Field data loading is forbidden on response<br>
at org.elasticsearch.index.fielddata.plain.DisabledIndexFieldData.fail(DisabledIndexFieldData.java:68)<br>
at org.elasticsearch.index.fielddata.plain.DisabledIndexFieldData.loadDirect(DisabledIndexFieldData.java:54)<br>
at org.elasticsearch.indices.fielddata.cache.IndicesFieldDataCache$IndexFieldCache$1.call(IndicesFieldDataCache.java:163)<br>
at org.elasticsearch.indices.fielddata.cache.IndicesFieldDataCache$IndexFieldCache$1.call(IndicesFieldDataCache.java:156)<br>
at com.google.common.cache.LocalCache$LocalManualCache$1.load(LocalCache.java:4742)<br>
at com.google.common.cache.LocalCache$LoadingValueReference.loadFuture(LocalCache.java:3527)<br>
at com.google.common.cache.LocalCache$Segment.loadSync(LocalCache.java:2319)<br>
at com.google.common.cache.LocalCache$Segment.lockedGetOrLoad(LocalCache.java:2282)<br>
at com.google.common.cache.LocalCache$Segment.get(LocalCache.java:2197)<br>
… 23 more</p>
<p dir="auto">Hi,</p>
<p dir="auto"><strong>Elasticsearch version</strong>: 2.2.1 (from <code class="notranslate">docker pull elasticsearch</code>)</p>
<p dir="auto"><strong>JVM version</strong>: OpenJDK 1.8.0_72-internal (from <code class="notranslate">docker pull elasticsearch</code></p>
<p dir="auto"><strong>OS version</strong>: Debian 8.3 (from <code class="notranslate">docker pull elasticsearch</code></p>
<p dir="auto"><strong>Description of the problem including expected versus actual behavior</strong>:</p>
<p dir="auto">Indexing some data were float64 data could be written as integer (by luck) makes elasticsearch refuse to index them.<br>
In a file were the first type indexed was a float type and then another in the collection could be written as integer will make the indexing fail.</p>
<p dir="auto">I think it should accept an integer in a floating point type, even if doesn't have the floating point format.<br>
On the other hand, I understand that it couldn't accept a floating point number in a integer type because it creates data loss.</p>
<p dir="auto"><strong>Steps to reproduce</strong>:</p>
<ol dir="auto">
<li><code class="notranslate">curl -X PUT localhost:9200/speed/record/1 -d '{ "speed_rec": [ { "speed": 61.23 }, { "speed": 61 } ] }'</code> will fail:<br>
<code class="notranslate">{"error":{"root_cause":[{"type":"mapper_parsing_exception","reason":"failed to parse"}],"type":"mapper_parsing_exception","reason":"failed to parse","caused_by":{"type":"illegal_argument_exception","reason":"mapper [speed_rec.speed] of different type, current_type [double], merged_type [long]"}},"status":400}</code></li>
<li><code class="notranslate">curl -X PUT localhost:9200/speed/record/1 -d '{ "speed_rec": [ { "speed": 61.23 }, { "speed": 61.0 } ] }'</code> will succeed <code class="notranslate">{"_index":"speed","_type":"record","_id":"1","_version":1,"_shards":{"total":2,"successful":1,"failed":0},"created":true}</code></li>
</ol>