Issue 1:
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.

error details:

1.kibana page error:

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@http://www.xxx.cn:80/bundles/c ... 64:30 RequestFailure@http://www.xxx.cn:80/bundles/c ... 97:19 http://www.xxx.cn:80/bundles/k ... 05:57 http://www.xxx.cn:80/bundles/c ... 91:28 http://www.xxx.cn:80/bundles/c ... 60:31 map@[native code] map@http://www.xxx.cn:80/bundles/c ... 59:34 callResponseHandlers@http://www.xxx.cn:80/bundles/k ... 77:26 http://www.xxx.cn:80/bundles/k ... 84:37 processQueue@http://www.xxx.cn:80/bundles/c ... 09:31 http://www.xxx.cn:80/bundles/c ... 25:40 $eval@http://www.xxx.cn:80/bundles/c ... 53:29 $digest@http://www.xxx.cn:80/bundles/c ... 64:37 $apply@http://www.xxx.cn:80/bundles/c ... 61:32 done@http://www.xxx.cn:80/bundles/c ... 10:54 completeRequest@http://www.xxx.cn:80/bundles/c ... 08:16 requestLoaded@http://www.xxx.cn:80/bundles/commons.bundle.js:37749:25

2.elasticsearch error log:

[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]

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];

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];

at org.elasticsearch.search.query.QueryPhase.execute(QueryPhase.java:343)

at org.elasticsearch.search.query.QueryPhase.execute(QueryPhase.java:106)

at org.elasticsearch.search.SearchService.loadOrExecuteQueryPhase(SearchService.java:363)

at org.elasticsearch.search.SearchService.executeQueryPhase(SearchService.java:375)

at org.elasticsearch.search.action.SearchServiceTransportAction$SearchQueryTransportHandler.messageReceived(SearchServiceTransportAction.java:368)

at org.elasticsearch.search.action.SearchServiceTransportAction$SearchQueryTransportHandler.messageReceived(SearchServiceTransportAction.java:365)

at org.elasticsearch.shield.transport.ShieldServerTransportService$ProfileSecuredRequestHandler.messageReceived(ShieldServerTransportService.java:165)

at org.elasticsearch.transport.TransportService$4.doRun(TransportService.java:350)

at org.elasticsearch.common.util.concurrent.AbstractRunnable.run(AbstractRunnable.java:37)

at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)

at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)

at java.lang.Thread.run(Thread.java:745)

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];

at org.elasticsearch.index.fielddata.plain.AbstractIndexFieldData.load(AbstractIndexFieldData.java:82)

at org.elasticsearch.search.aggregations.support.ValuesSource$Bytes$FieldData.bytesValues(ValuesSource.java:195)

at org.elasticsearch.search.aggregations.bucket.terms.StringTermsAggregator.getLeafCollector(StringTermsAggregator.java:73)

at org.elasticsearch.search.aggregations.AggregatorBase.getLeafCollector(AggregatorBase.java:132)

at org.elasticsearch.search.aggregations.AggregatorBase.getLeafCollector(AggregatorBase.java:38)

at org.apache.lucene.search.MultiCollector.getLeafCollector(MultiCollector.java:117)

at org.apache.lucene.search.IndexSearcher.search(IndexSearcher.java:763)

at org.apache.lucene.search.IndexSearcher.search(IndexSearcher.java:486)

at org.elasticsearch.search.query.QueryPhase.execute(QueryPhase.java:324)

... 11 more

Vian 00:18:36

Caused by: com.google.common.util.concurrent.UncheckedExecutionException: java.lang.IllegalStateException: Field data loading is forbidden on response

at com.google.common.cache.LocalCache$Segment.get(LocalCache.java:2203)

at com.google.common.cache.LocalCache.get(LocalCache.java:3937)

at com.google.common.cache.LocalCache$LocalManualCache.get(LocalCache.java:4739)

at org.elasticsearch.indices.fielddata.cache.IndicesFieldDataCache$IndexFieldCache.load(IndicesFieldDataCache.java:156)

at org.elasticsearch.index.fielddata.plain.AbstractIndexFieldData.load(AbstractIndexFieldData.java:76)

… 19 more

Caused by: java.lang.IllegalStateException: Field data loading is forbidden on response

at org.elasticsearch.index.fielddata.plain.DisabledIndexFieldData.fail(DisabledIndexFieldData.java:68)

at org.elasticsearch.index.fielddata.plain.DisabledIndexFieldData.loadDirect(DisabledIndexFieldData.java:54)

at org.elasticsearch.indices.fielddata.cache.IndicesFieldDataCache$IndexFieldCache$1.call(IndicesFieldDataCache.java:163)

at org.elasticsearch.indices.fielddata.cache.IndicesFieldDataCache$IndexFieldCache$1.call(IndicesFieldDataCache.java:156)

at com.google.common.cache.LocalCache$LocalManualCache$1.load(LocalCache.java:4742)

at com.google.common.cache.LocalCache$LoadingValueReference.loadFuture(LocalCache.java:3527)

at com.google.common.cache.LocalCache$Segment.loadSync(LocalCache.java:2319)

at com.google.common.cache.LocalCache$Segment.lockedGetOrLoad(LocalCache.java:2282)

at com.google.common.cache.LocalCache$Segment.get(LocalCache.java:2197)

… 23 more

Issue 2:
Hi,

Elasticsearch version: 2.2.1 (from docker pull elasticsearch)

JVM version: OpenJDK 1.8.0_72-internal (from docker pull elasticsearch

OS version: Debian 8.3 (from docker pull elasticsearch

Description of the problem including expected versus actual behavior:

Indexing some data were float64 data could be written as integer (by luck) makes elasticsearch refuse to index them.

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.

I think it should accept an integer in a floating point type, even if doesn't have the floating point format.

On the other hand, I understand that it couldn't accept a floating point number in a integer type because it creates data loss.

Steps to reproduce:

curl -X PUT localhost:9200/speed/record/1 -d '{ "speed_rec": [ { "speed": 61.23 }, { "speed": 61 } ] }' will fail:

{"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}

curl -X PUT localhost:9200/speed/record/1 -d '{ "speed_rec": [ { "speed": 61.23 }, { "speed": 61.0 } ] }' will succeed {"_index":"speed","_type":"record","_id":"1","_version":1,"_shards":{"total":2,"successful":1,"failed":0},"created":true}