shirosaidev / stocksight

Stock market analyzer and predictor using Elasticsearch, Twitter, News headlines and Python natural language processing and sentiment analysis
https://shirosaidev.github.io/stocksight/
Apache License 2.0
2.12k stars 463 forks source link

PUT http://localhost:9200/stocksight [status:400 request:0.014s] #16

Closed Aanerud closed 5 years ago

Aanerud commented 5 years ago

Hey, had some time today so decided to give this a go, but I get an error running the script.

2019-05-18 11:40:36,349 [INFO][stocksight] Creating new Elasticsearch index or using existing stocksight 2019-05-18 11:40:36,364 [INFO][elasticsearch] PUT http://localhost:9200/stocksight [status:400 request:0.014s] 2019-05-18 11:40:36,364 [DEBUG][elasticsearch] > {"mappings": {"newsheadline": {"properties": {"polarity": {"type": "float"}, "sentiment": {"fields": {"keyword": {"type": "keyword"}}, "type": "string"}, "location": {"fields": {"keyword": {"type": "keyword"}}, "type": "string"}, "subjectivity": {"type": "float"}, "date": {"type": "date"}, "message": {"fields": {"keyword": {"type": "keyword"}, "english": {"type": "string", "analyzer": "english"}}, "type": "string"}}}, "tweet": {"properties": {"subjectivity": {"type": "float"}, "date": {"type": "date"}, "message": {"fields": {"keyword": {"type": "keyword"}, "english": {"type": "string", "analyzer": "english"}}, "type": "string"}, "friends": {"type": "long"}, "statuses": {"type": "long"}, "polarity": {"type": "float"}, "sentiment": {"fields": {"keyword": {"type": "keyword"}}, "type": "string"}, "language": {"fields": {"keyword": {"type": "keyword"}}, "type": "string"}, "author": {"fields": {"keyword": {"type": "keyword"}}, "type": "string"}, "tweet_id": {"type": "long"}, "followers": {"type": "long"}, "location": {"fields": {"keyword": {"type": "keyword"}}, "type": "string"}}}}} 2019-05-18 11:40:36,365 [DEBUG][elasticsearch] < {"error":{"root_cause":[{"type":"mapper_parsing_exception","reason":"No handler for type [string] declared on field [sentiment]"}],"type":"mapper_parsing_exception","reason":"Failed to parse mapping [tweet]: No handler for type [string] declared on field [sentiment]","caused_by":{"type":"mapper_parsing_exception","reason":"No handler for type [string] declared on field [sentiment]"}},"status":400} 2019-05-18 11:40:36,366 [INFO][stocksight] Looking up Twitter user ids from usernames...

Info regarding elastic search

andy@shirosaidev-stocksight:~/stocksight$ curl http://localhost:9200/ { "name" : "Cluster_01_Node_001", "cluster_name" : "ES_Cluster_01", "cluster_uuid" : "FKGqityWS1mJyc_s46Ukqg", "version" : { "number" : "6.7.2", "build_flavor" : "default", "build_type" : "deb", "build_hash" : "56c6e48", "build_date" : "2019-04-29T09:05:50.290371Z", "build_snapshot" : false, "lucene_version" : "7.7.0", "minimum_wire_compatibility_version" : "5.6.0", "minimum_index_compatibility_version" : "5.0.0" }, "tagline" : "You Know, for Search" }

glitchawy commented 1 year ago

can i know how to solve this ?