bitemyapp / bloodhound

Haskell Elasticsearch client and query DSL
bitemyapp.com
BSD 3-Clause "New" or "Revised" License
424 stars 118 forks source link

Impossible to get child documents #62

Closed centromere closed 8 years ago

centromere commented 9 years ago

As it stands, it is impossible for a user to retrieve/test for the existence of individual child documents, since the parent ID must be specified (?parent=...). This is needed so that ES can route the request to the proper shard. How should the API be altered to accommodate this?

centromere commented 9 years ago

For my purposes I've changed the type signature of documentExists to be as follows:

documentExists :: MonadBH m => IndexName -> MappingName
               -> Maybe DocumentParent -> DocId -> m Bool

It works, but there are other ES features which, if support is desired, would necessitate an API change. Perhaps something like a GetDocumentSettings type should be used?