Hello, I just installed elasticsearch today. I downloaded some stock market data from an exchange using curl and saved them as a json. I'm having trouble with uploading the json files to the elasticsearch. I'm trying to use the bulk API but it always returns malformed action. Here are what my data looks like.
{"draw":0,"recordsTotal":510,"recordsFiltered":510,"data":[{"No":1,"IDStockSummary":1385663,"Date":"2015-01-05T00:00:00","StockCode":"AALI","StockName":"Astra Agro Lestari Tbk.","Remarks":"--S1BXO1","Previous":24575.0,"OpenPrice":24600.0,"FirstTrade":24600.0,"High":24700.0,"Low":24350.0,"Close":24675.0,"Change":100.0,"Volume":589900.0,"Value":14492460000.0,"Frequency":790.0,"IndexIndividual":1910.3,"Offer":24675.0,"OfferVolume":95300.0,"Bid":24650.0,"BidVolume":3500.0,"ListedShares":1574745000.0,"TradebleShares":1574745000.0,"WeightForIndex":1574745000.0,"ForeignSell":71600.0,"ForeignBuy":229700.0,"DelistingDate":"","NonRegularVolume":0.0,"NonRegularValue":0.0,"NonRegularFrequency":0.0,"persen":null,"percentage":null},{"No":2,"IDStockSummary":1385664,"Date":"2015-01-05T00:00:00","StockCode":"ABBA","StockName":"Mahaka Media Tbk.","Remarks":"--U9---2","Previous":62.0,"OpenPrice":0.0,"FirstTrade":0.0,"High":62.0,"Low":57.0,"Close":60.0,"Change":-2.0,"Volume":690900.0,"Value":40174700.0,"Frequency":63.0,"IndexIndividual":105.3,"Offer":60.0,"OfferVolume":49100.0,"Bid":59.0,"BidVolume":101300.0,"ListedShares":2755125000.0,"TradebleShares":2755125000.0,"WeightForIndex":2755125000.0,"ForeignSell":0.0,"ForeignBuy":0.0,"DelistingDate":"","NonRegularVolume":0.0,"NonRegularValue":0.0,"NonRegularFrequency":0.0,"persen":null,"percentage":null},
and so on to 500 company. Every single one of them is on a single line.
For the sake of readability, I'll put the pretty version below
{ "draw": 0, "recordsTotal": 510, "recordsFiltered": 510, "data": [ { "No": 1, "IDStockSummary": 1385663, "Date": "2015-01-05T00:00:00", "StockCode": "AALI", "StockName": "Astra Agro Lestari Tbk.", "Remarks": "--S1BXO1", "Previous": 24575, "OpenPrice": 24600, "FirstTrade": 24600, "High": 24700, "Low": 24350, "Close": 24675, "Change": 100, "Volume": 589900, "Value": 14492460000, "Frequency": 790, "IndexIndividual": 1910.3, "Offer": 24675, "OfferVolume": 95300, "Bid": 24650, "BidVolume": 3500, "ListedShares": 1574745000, "TradebleShares": 1574745000, "WeightForIndex": 1574745000, "ForeignSell": 71600, "ForeignBuy": 229700, "DelistingDate": "", "NonRegularVolume": 0, "NonRegularValue": 0, "NonRegularFrequency": 0, "persen": null, "percentage": null }, { "No": 2, "IDStockSummary": 1385664, "Date": "2015-01-05T00:00:00", "StockCode": "ABBA", "StockName": "Mahaka Media Tbk.", "Remarks": "--U9---2", "Previous": 62, "OpenPrice": 0, "FirstTrade": 0, "High": 62, "Low": 57, "Close": 60, "Change": -2, "Volume": 690900, "Value": 40174700, "Frequency": 63, "IndexIndividual": 105.3, "Offer": 60, "OfferVolume": 49100, "Bid": 59, "BidVolume": 101300, "ListedShares": 2755125000, "TradebleShares": 2755125000, "WeightForIndex": 2755125000, "ForeignSell": 0, "ForeignBuy": 0, "DelistingDate": "", "NonRegularVolume": 0, "NonRegularValue": 0, "NonRegularFrequency": 0, "persen": null, "percentage": null }, //and so on ] }
I've read the Bulk API documentation however it still doesn't work. I've also read that this is a DataTables server-side post Any idea how can I fix this? Thank you