olivere / elastic

Deprecated: Use the official Elasticsearch client for Go at https://github.com/elastic/go-elasticsearch
https://olivere.github.io/elastic/
MIT License
7.41k stars 1.15k forks source link

Reindexer es background error #233

Closed jiashiwen closed 8 years ago

jiashiwen commented 8 years ago

Hi! When i use reindexer,my es background get errors like this: [2016-02-25 21:49:20,314][DEBUG][action.bulk ] [es3] [houses_trans][2] failed to execute bulk item (index) index {[houses_trans][house][uc_109035], source[{"_category":"乐居楼盘","_content":"宣城市宣州区水阳镇\n安徽万易投资有限公司\n  宣城万易时代花园,万易时代花园项目概况 一、规划背景和区位条件: 宣城市宣州区水阳镇位于江苏省发达城市的产业梯度转移的前沿,具有独特的的地理区位优势。面对把皖江城市带作业国家级承接产业转移示范区,水阳镇为承接皖江城市带产业转移示范区的转移做好积极准备,对本镇吸引外资、引进技术,提高自我发展的能力起到积极推动作用。 水阳镇位于宣城市宣州区北部,地处皖苏两省四市交界处。水阳镇区位优势,交通便捷,处于皖苏两省经济、文化交流结合部和南京、芜湖、马鞍山等大中城市经济辐射圈上,有着开放引进、加快发展的得天独厚区位交通优势和有利条件。二、规划目标: 力争将小区建设成位功能分区合理、设施完善、环境清新优美、体现江南水乡特色的居住空间。 尊重基地周边的人文与自然环境,突出基地内部空间及环境的整体设计,充分利用自然环境条件。三、建设项目情况: 安徽万易投资公司投资开发的万易时代花园位于宣州区、水阳镇北部,水阳中学北侧,镇利民路(36米)以南、水阳江大道(24米)以东地段,规划总用地面积约2.02公顷,项目共有9幢多层建筑,规划总用地面积18573m2、规化总建筑面积30243.78m2 、其中多层21814.87m2 共164套、商业8428.81m2共78套,容积率1.49,绿地率30.52%,建设密度29.83%,1#至6#楼临城市主道路,为沿街建;一、二层为框架结构,作为商业用房,三、四、五层是住宅用房;7#、8#、9#楼均为住宅楼,1#和2#楼在2010年12月开工建设,至2011年10月交付用户施用,3#、4#、5#、6#、7#、8#、9#楼已经开工建设。基础均已经完成,部分楼已经完成了三层结构。到2011年6月全部交付使用。整个小区公共与绿化、小区道路等设施在2011年内全部完成。 \r\n","_doccreatetime":1.378535349e+09,"_docupdatetime":1.456322328e+09,"_origin":{"_source":"","address":"宣城市宣州区水阳镇","advantage":"","affect_people":"","aimclient":"","aircondition":"","archtype":"9","archtype2":"多层","archtype_cn":"多层","area":"0","area_cn":"","area_code":"0563","baidu_baike_url":"","bay_area_max":"","bay_area_min":"","bmap_coordx":"13223285.08","bmap_coordx2":"118.78549843","bmap_coordy":"3639765.33","bmap_coordy2":"31.22588878","bmap_map_scale":"14","boost":"50","building_area":"30243.78","building_height":"0","building_pattern":"","business_area":"","business_street":"","cc_inbound":"0","cc_partner":"0","circlelocation":"0","circlelocation_cn":"","circlelocation_code":"","city":"uc","clicks":"10050","cms_did":"0","comments":"水阳镇区位优势,交通便捷,处于皖苏两省经济、文化交流结合部和南京、芜湖、马鞍山等大中城市经济辐射圈上,有着开放引进、加快发展的得天独厚区位交通优势和有利条件。","commerce_layout":"","commerce_other":"","communication":"","commute":"","company_ad":"","company_build":"","company_commercial":"","company_consultant":"","company_design":"","company_interior":"","company_other":"","company_plan":"","company_saleagent":"","company_view_build":"","company_view_design":"","completion_time":"0","contract_term":"","coordx":"118785","coordx2":"118.78549843","coordy":"31226","coordy2":"31.22588878","corporation":"","coverage_area":"18573","createtime":"1378535349","creator":"xuanchenghouse","dc_id":"","delivertime":"201106","delivertime2":2011,"developer":"安徽万易投资有限公司","developer_guid":"","developerid":"0","developmentarea_id":"0","developmentarea_name":"","disadvantage":"","display_comments":"0","display_links":"0","district":"8702","district_cn":"宣州区","editor":"","editoruid":"0","ejq_state":"0","elevator_brand":"","elevator_count":"","ename":"wanyishidaihuayuan","ename_short":"119","esf_id":"0","esf_id2":"","family_population":"","finish_standard":"","firefighting":"","firment_wall":"","fitment":"1","fitment2":"","fitment_cn":"毛坯","fitment_company":"","fitment_corridor":"","fitment_door":"","fitment_elevator_hall":"","fitment_floor":"","fitment_hall":"","fitment_other":"","fitment_outwall_meterial":"","fitment_outwall_style":"","fitment_park_elevator":"","fitment_price_max":"","fitment_price_min":"","fitment_room":"","fitment_standard":"","fitment_toilet":"","fitment_window":"","floor":"","floor_area":"","floor_desc":"","floor_height":"","floor_layout":"","floor_realheight":"","forum":"5783879562635246772","forumurl":"http://bj.bbs.house.sina.com.cn/forum-5783879562635246772/","free_term":"","goldeye_area":"","goldeye_name":"","greenratio":"30.52","gridcode":"0","hall_area":"","hall_height":"","heating":"","heating_fee":"","hid":"109035","homeid":"","hometag":"","hometag_cn":"","hometype":"1","hometype2":"普通住宅","hometype_cn":"普通住宅","house_id":"158497281203612139","house_level":"3","housetype":"","id":"129792","insite_corporation":"","insite_peitao":"","inteligence":"","introduce":"  宣城万易时代花园,万易时代花园项目概况 一、规划背景和区位条件: 宣城市宣州区水阳镇位于江苏省发达城市的产业梯度转移的前沿,具有独特的的地理区位优势。面对把皖江城市带作业国家级承接产业转移示范区,水阳镇为承接皖江城市带产业转移示范区的转移做好积极准备,对本镇吸引外资、引进技术,提高自我发展的能力起到积极推动作用。 水阳镇位于宣城市宣州区北部,地处皖苏两省四市交界处。水阳镇区位优势,交通便捷,处于皖苏两省经济、文化交流结合部和南京、芜湖、马鞍山等大中城市经济辐射圈上,有着开放引进、加快发展的得天独厚区位交通优势和有利条件。二、规划目标: 力争将小区建设成位功能分区合理、设施完善、环境清新优美、体现江南水乡特色的居住空间。 尊重基地周边的人文与自然环境,突出基地内部空间及环境的整体设计,充分利用自然环境条件。三、建设项目情况: 安徽万易投资公司投资开发的万易时代花园位于宣州区、水阳镇北部,水阳中学北侧,镇利民路(36米)以南、水阳江大道(24米)以东地段,规划总用地面积约2.02公顷,项目共有9幢多层建筑,规划总用地面积18573m2、规化总建筑面积30243.78m2 、其中多层21814.87m2 共164套、商业8428.81m2共78套,容积率1.49,绿地率30.52%,建设密度29.83%,1#至6#楼临城市主道路,为沿街建;一、二层为框架结构,作为商业用房,三、四、五层是住宅用房;7#、8#、9#楼均为住宅楼,1#和2#楼在2010年12月开工建设,至2011年10月交付用户施用,3#、4#、5#、6#、7#、8#、9#楼已经开工建设。基础均已经完成,部分楼已经完成了三层结构。到2011年6月全部交付使用。整个小区公共与绿化、小区道路等设施在2011年内全部完成。 \r\n","investor":"","is_criclj":"0","is_customer":"0","is_esf":"0","is_linked":"0","is_show_old":"1","is_wholesale":"0","isdiscount":"0","isextphone":"0","isgroupbuy":"0","ishidden":"0","item":"0","item_name":"","jump_id":"0","keyid":"129792","lejutong_url":"","licence":"宣[2011]房预售证第006号 宣(区)房预售证第002号 宣[2010]区房预售证第001号","lifewater":"","link_id":"0","main_housetype":"","main_housetype2":"","main_shop":"","management":"","map_icon":"","map_scale":"13","merchant":"","mianji":"","modify_timestamp":1.3981354e+09,"name":"万易时代花园","nearby_commercial":"水阳镇区位优势,交通便捷,处于皖苏两省经济、文化交流结合部和南京、芜湖、马鞍山等大中城市经济辐射圈上,有着开放引进、加快发展的得天独厚区位交通优势和有利条件。","nearby_hospital":"","nearby_park":"","nearby_peitao":"","nearby_school":"","nearby_traffic":"","nearby_view":"","netsellurl":"","office_area":"","office_level":"","office_level2":"","officetype":"","officetype2":"","oldhomeid":"","oldname":"","opendate":"0","opendate2":"","opentime":"201012","opentime2":2010,"orientation":"0","orientation_cn":"","other_system":"","otherequipment":"","params":"","parent_name":"","park_count":"","park_equipment":"","park_fee":"","park_ratio":"","payment_first":"0","payment_first_cn":"","payment_monthly":"0","payment_monthly_cn":"","payment_type":"0","payment_type_rent":"","payment_type_rent2":"","phone_extension":"","pic_s":"http://data.house.sina.com.cn/images/default_m.jpg","pic_s320":"http://data.house.sina.com.cn/images/default_m.jpg","pic_thumb":"","pkrecommend":"","plan_user_count":"0","plotratio":"4","plotratio_cn":"1.49","powersupply":"","preferential_policies":"","price":"","price_avg":"0","price_avg_rent":"0","price_history":"","price_history2":"","price_history_rent":"","price_history_rent2":"","price_max":"0","price_max_rent":"0","price_min":"0","price_min_rent":"0","price_off":"","price_off_style":"0","price_off_url":"","price_rent":"","price_sum":"0","price_sum_max":"0","price_sum_min":"0","price_trend":"0","price_wholesale":"0","pricerange":"0","proj121":"0","project_wblogid":"5078198068","property_company":"","property_company_id":"0","property_duration":"","property_fee":"","property_type":"乡镇产权房","province":"","pz_style":"3","pz_type":"1","rent_ratio":"","rent_type":"","rent_type2":"","rental_area":"","running_purpose":"","sale_area":"","sale_template":"0","saleaddress":"水阳镇","salemode":"","salephone":"3590222","salephone_flag":"0","salephone_flag2":"0","salestate":"4","salestate2":"","salestate_updatetime":"1381736861","salestateorder":"15","security":"","sendto_search":"0","seo_descr":"","seo_keyword":"","seo_title":"","shapan_iframe":"","shapan_iframe_height":"0","shapan_iframe_width":"0","shop_area":"","shop_feature":"","shop_feature2":"","shop_hours":"","shop_hours2":"","shoptype":"","shoptype2":"","shoulouchu_weiboid":"5078198068","site":"uc","site_cn":"uc","special":"环境优美 江南水乡","split_word":"","start_time":"0","status":"1","subscribe_merchant":"","subway":"","subway_cn":"","system_create_time":"1393496709","system_sharding_flag":"563","system_sharding_id":"391","tablewater":"","target_business_type":"","top_header_pic":"","trade_area":"","traffic":"宣州区水阳镇","tuangou":"0","tuangou_count":"170","tuiguang_iframe":"","tujie_time":"0","type":"1","updatetime":"1383358851","updator":"xuanchenghouse","use_ratio":"","videourl":"","villa_type":"","wblogid":"","website":"","youhui_url":"","zipcode":"0"},"_scope":"uc","_tags":"","_title":"万易时代花园","_url":"http://data.house.sina.com.cn/uc109035/","address":"宣城市宣州区水阳镇","ejq_state":"0","hid":"109035","introduce":"  宣城万易时代花园,万易时代花园项目概况 一、规划背景和区位条件: 宣城市宣州区水阳镇位于江苏省发达城市的产业梯度转移的前沿,具有独特的的地理区位优势。面对把皖江城市带作业国家级承接产业转移示范区,水阳镇为承接皖江城市带产业转移示范区的转移做好积极准备,对本镇吸引外资、引进技术,提高自我发展的能力起到积极推动作用。 水阳镇位于宣城市宣州区北部,地处皖苏两省四市交界处。水阳镇区位优势,交通便捷,处于皖苏两省经济、文化交流结合部和南京、芜湖、马鞍山等大中城市经济辐射圈上,有着开放引进、加快发展的得天独厚区位交通优势和有利条件。二、规划目标: 力争将小区建设成位功能分区合理、设施完善、环境清新优美、体现江南水乡特色的居住空间。 尊重基地周边的人文与自然环境,突出基地内部空间及环境的整体设计,充分利用自然环境条件。三、建设项目情况: 安徽万易投资公司投资开发的万易时代花园位于宣州区、水阳镇北部,水阳中学北侧,镇利民路(36米)以南、水阳江大道(24米)以东地段,规划总用地面积约2.02公顷,项目共有9幢多层建筑,规划总用地面积18573m2、规化总建筑面积30243.78m2 、其中多层21814.87m2 共164套、商业8428.81m2共78套,容积率1.49,绿地率30.52%,建设密度29.83%,1#至6#楼临城市主道路,为沿街建;一、二层为框架结构,作为商业用房,三、四、五层是住宅用房;7#、8#、9#楼均为住宅楼,1#和2#楼在2010年12月开工建设,至2011年10月交付用户施用,3#、4#、5#、6#、7#、8#、9#楼已经开工建设。基础均已经完成,部分楼已经完成了三层结构。到2011年6月全部交付使用。整个小区公共与绿化、小区道路等设施在2011年内全部完成。 \r\n","is_esf":"0","name":"万易时代花园","proj121":"0","site":"uc","status":"1","traffic":"宣州区水阳镇"}]} MapperParsingException[failed to parse [_doccreatetime]]; nested: IllegalArgumentException[Invalid format: "1.378535349e+09" is malformed at ".378535349e+09"]; at org.elasticsearch.index.mapper.FieldMapper.parse(FieldMapper.java:339) at org.elasticsearch.index.mapper.DocumentParser.parseObjectOrField(DocumentParser.java:314) at org.elasticsearch.index.mapper.DocumentParser.parseValue(DocumentParser.java:441) at org.elasticsearch.index.mapper.DocumentParser.parseObject(DocumentParser.java:267) at org.elasticsearch.index.mapper.DocumentParser.innerParseDocument(DocumentParser.java:127) at org.elasticsearch.index.mapper.DocumentParser.parseDocument(DocumentParser.java:79) at org.elasticsearch.index.mapper.DocumentMapper.parse(DocumentMapper.java:304) at org.elasticsearch.index.shard.IndexShard.prepareIndex(IndexShard.java:551) at org.elasticsearch.index.shard.IndexShard.prepareIndex(IndexShard.java:542) at org.elasticsearch.action.support.replication.TransportReplicationAction.prepareIndexOperationOnPrimary(TransportReplicationAction.java:1049) at org.elasticsearch.action.support.replication.TransportReplicationAction.executeIndexRequestOnPrimary(TransportReplicationAction.java:1060) at org.elasticsearch.action.bulk.TransportShardBulkAction.shardIndexOperation(TransportShardBulkAction.java:338) at org.elasticsearch.action.bulk.TransportShardBulkAction.shardOperationOnPrimary(TransportShardBulkAction.java:131) at org.elasticsearch.action.support.replication.TransportReplicationAction$PrimaryPhase.performOnPrimary(TransportReplicationAction.java:579) at org.elasticsearch.action.support.replication.TransportReplicationAction$PrimaryPhase$1.doRun(TransportReplicationAction.java:452) 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: java.lang.IllegalArgumentException: Invalid format: "1.378535349e+09" is malformed at ".378535349e+09" at org.joda.time.format.DateTimeParserBucket.doParseMillis(DateTimeParserBucket.java:187) at org.joda.time.format.DateTimeFormatter.parseMillis(DateTimeFormatter.java:780) at org.elasticsearch.index.mapper.core.DateFieldMapper$DateFieldType.parseStringValue(DateFieldMapper.java:360) at org.elasticsearch.index.mapper.core.DateFieldMapper.innerParseCreateField(DateFieldMapper.java:526) at org.elasticsearch.index.mapper.core.NumberFieldMapper.parseCreateField(NumberFieldMapper.java:213) at org.elasticsearch.index.mapper.FieldMapper.parse(FieldMapper.java:331) ... 18 more


And my _doccreatetime mapping is : "_doccreatetime": { "type": "date", "store": true, "format": "strict_date_optional_time||epoch_millis||yyyy-MM-dd HH:mm:ss||yyyy/MM/dd" },

and the source like: "_doccreatetime": 1378535349

why the data changed? thanks!

olivere commented 8 years ago

Elastic doesn't change the underlying source. It uses encoding/json to serialize and deserialize. It's hard to tell without further knowing how you exactly generate the documents. Are you sure you're not using a float64 for generating the _doccreatetime (see [http://play.golang.org/p/qqb4o0iiNK]).

It's partly due to the fact that JSON doesn't have separate types for integers and decimals: It only has number, and that sometimes gets generated in the given form. Maybe it's safer to just use strings for the date.

jiashiwen commented 8 years ago

Thank you