@@ -313,6 +313,8 @@ putMapping :: (MonadBH m, ToJSON a) => IndexName
313313putMapping (IndexName indexName) (MappingName mappingName) mapping =
314314 bindM2 put url (return body)
315315 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"
316318 body = Just $ encode mapping
317319
318320-- | 'deleteMapping' is an HTTP DELETE and deletes a mapping for a given index.
@@ -326,6 +328,8 @@ putMapping (IndexName indexName) (MappingName mappingName) mapping =
326328deleteMapping :: MonadBH m => IndexName -> MappingName -> m Reply
327329deleteMapping (IndexName indexName)
328330 (MappingName mappingName) =
331+ -- "_mapping" and mappingName below were originally transposed
332+ -- erroneously. The correct API call is: "/INDEX/_mapping/MAPPING_NAME"
329333 delete =<< joinPath [indexName, "_mapping", mappingName]
330334
331335-- | 'indexDocument' is the primary way to save a single document in