Closed yannick-cw closed 7 years ago
Thank you for putting this up! I apologize for not getting to it sooner :cry:
I merged the other PR which fixed this, so hopefully nobody else trips over this.
@bitemyapp perfect :) What do you think of extending the example file with the reply parsing?
reply <- searchByType testIndex testMapping search
Right searchResult <- parseEsResponse reply :: BH IO (Either EsError (SearchResult Tweet))
let tweets = fmap hitSource (hits $ searchHits searchResult) >>= maybeToList
liftIO (print tweets)
@yannick-cw I think it'd be a good idea for it to do that and to detect errors, throwing an exception if one occurs.
Hi, I had a hard time figuring out how to parse the responses for searches. When trying to run the example I also found out some stuff was not working :)
I'd like to add an example here for parsing and I fixed the geo object datatype, as it only accepts
lat
,lon
now as field names.I am just starting to learn haskell, so please forgive me if something is bad style.