git.iko.soy/typeable/bloodhound
on master help sign in
Merge pull request #178 from flip111/patch-1

update docs about DocId

commit1e14794f5c6410f3acd6dcc39f9ea0f7fceb76d9 authorChris Allen <cma@bitemyapp.com> dateTue 5 Dec 2017, 13:02 (9 years ago) parent07f6bc5c5bcfd1
1 file changed+4−1
src/Database/V5/Bloodhound/Client.hs+4−1
src/Database/V5/Bloodhound/Client.hs+4−1
@@ -809,7 +809,10 @@ versionCtlParams cfg =
809809-- | 'indexDocument' is the primary way to save a single document in
810810-- Elasticsearch. The document itself is simply something we can
811811-- convert into a JSON 'Value'. The 'DocId' will function as the
812−-- primary key for the document.
812+-- primary key for the document. You are encouraged to generate
813+-- your own id's and not rely on ElasticSearch's automatic id
814+-- generation. Read more about it here:
815+-- https://github.com/bitemyapp/bloodhound/issues/107
813816--
814817-- >>> resp <- runBH' $ indexDocument testIndex testMapping defaultIndexDocumentSettings exampleTweet (DocId "1")
815818-- >>> print resp