@@ -1028,20 +1028,26 @@ main = hspec $ do
1028 _ <- insertData
1028 _ <- insertData
1029 let firstTest = BulkTest "blah"
1029 let firstTest = BulkTest "blah"
1030 let secondTest = BulkTest "bloo"
1030 let secondTest = BulkTest "bloo"
1031+ let thirdTest = BulkTest "graffle"
1031 let firstDoc = BulkIndex testIndex
1032 let firstDoc = BulkIndex testIndex
1032 testMapping (DocId "2") (toJSON firstTest)
1033 testMapping (DocId "2") (toJSON firstTest)
1033 let secondDoc = BulkCreate testIndex
1034 let secondDoc = BulkCreate testIndex
1034 testMapping (DocId "3") (toJSON secondTest)
1035 testMapping (DocId "3") (toJSON secondTest)
1036+ let thirdDoc = BulkCreateEncoding testIndex
1037+ testMapping (DocId "4") (toEncoding thirdTest)
1035− let stream = V.fromList [firstDoc, secondDoc]
1038+ let stream = V.fromList [firstDoc, secondDoc, thirdDoc]
1036 _ <- bulk stream
1039 _ <- bulk stream
1037 _ <- refreshIndex testIndex
1040 _ <- refreshIndex testIndex
1038 fDoc <- getDocument testIndex testMapping (DocId "2")
1041 fDoc <- getDocument testIndex testMapping (DocId "2")
1039 sDoc <- getDocument testIndex testMapping (DocId "3")
1042 sDoc <- getDocument testIndex testMapping (DocId "3")
1043+ tDoc <- getDocument testIndex testMapping (DocId "4")
1040 let maybeFirst = eitherDecode $ responseBody fDoc :: Either String (EsResult BulkTest)
1044 let maybeFirst = eitherDecode $ responseBody fDoc :: Either String (EsResult BulkTest)
1041 let maybeSecond = eitherDecode $ responseBody sDoc :: Either String (EsResult BulkTest)
1045 let maybeSecond = eitherDecode $ responseBody sDoc :: Either String (EsResult BulkTest)
1046+ let maybeThird = eitherDecode $ responseBody tDoc :: Either String (EsResult BulkTest)
1042 liftIO $ do
1047 liftIO $ do
1043 fmap getSource maybeFirst `shouldBe` Right (Just firstTest)
1048 fmap getSource maybeFirst `shouldBe` Right (Just firstTest)
1044 fmap getSource maybeSecond `shouldBe` Right (Just secondTest)
1049 fmap getSource maybeSecond `shouldBe` Right (Just secondTest)
1050+ fmap getSource maybeThird `shouldBe` Right (Just thirdTest)
1047 describe "query API" $ do
1053 describe "query API" $ do