Copyright | (c) CNRS 2017 |
---|---|
License | AGPL + CECILL v3 |
Maintainer | team@gargantext.org |
Stability | experimental |
Portability | POSIX |
Safe Haskell | Safe-Inferred |
Language | Haskell2010 |
Synopsis
- get :: Text -> RawQuery -> Maybe Limit -> IO (Either ClientError (Maybe Integer, ConduitT () HyperdataDocument IO ()))
- newtype ESearch = ESearch {
- _ESearch :: [EscapeItem]
- convertQuery :: Query -> ESearch
- getESearch :: ESearch -> Text
Documentation
get :: Text -> RawQuery -> Maybe Limit -> IO (Either ClientError (Maybe Integer, ConduitT () HyperdataDocument IO ())) #
Internals for testing
A pubmed query.
See: https://www.ncbi.nlm.nih.gov/books/NBK25499/#chapter4.ESearch
The documentation for PUBMED says:
Values for query keys may also be provided in term if they are preceeded by a
#
(%23 in the URL). While only one query_key parameter can be provided to ESearch,
any number of query keys can be combined in term. Also, if query keys are provided in term,
they can be combined with OR or NOT in addition to AND.
Example:
esearch.fcgi?db=pubmed&term=%231+AND+asthma&WebEnv=string&usehistory=y
Therefore, we can pretty-print our Query
back into something that PubMed could understand.
ESearch | |
|
convertQuery :: Query -> ESearch #
getESearch :: ESearch -> Text #
Returns an url encoded query ready to be sent to pubmed.