git.iko.soy/typeable/bloodhound
on master help sign in
Added documentation about fix
5aa9a73John Galt
src/Database/Bloodhound/Client.hs+4
@@ -313,6 +313,8 @@ putMapping :: (MonadBH m, ToJSON a) => IndexName
313putMapping (IndexName indexName) (MappingName mappingName) mapping =
313putMapping (IndexName indexName) (MappingName mappingName) mapping =
314 bindM2 put url (return body)
314 bindM2 put url (return body)
315 where url = joinPath [indexName, "_mapping", mappingName]
315 where url = joinPath [indexName, "_mapping", mappingName]
316+ -- "_mapping" and mappingName above were originally transposed
317+ -- erroneously. The correct API call is: "/INDEX/_mapping/MAPPING_NAME"
316 body = Just $ encode mapping
318 body = Just $ encode mapping
317
319
318-- | 'deleteMapping' is an HTTP DELETE and deletes a mapping for a given index.
320-- | 'deleteMapping' is an HTTP DELETE and deletes a mapping for a given index.
@@ -326,6 +328,8 @@ putMapping (IndexName indexName) (MappingName mappingName) mapping =
326deleteMapping :: MonadBH m => IndexName -> MappingName -> m Reply
328deleteMapping :: MonadBH m => IndexName -> MappingName -> m Reply
327deleteMapping (IndexName indexName)
329deleteMapping (IndexName indexName)
328 (MappingName mappingName) =
330 (MappingName mappingName) =
331+ -- "_mapping" and mappingName below were originally transposed
332+ -- erroneously. The correct API call is: "/INDEX/_mapping/MAPPING_NAME"
329 delete =<< joinPath [indexName, "_mapping", mappingName]
333 delete =<< joinPath [indexName, "_mapping", mappingName]
330
334
331-- | 'indexDocument' is the primary way to save a single document in
335-- | 'indexDocument' is the primary way to save a single document in