Commit 3a61fb84 authored by Przemyslaw Kaminski's avatar Przemyslaw Kaminski

apiSimpleC function

parent 84b68adb
...@@ -41,6 +41,12 @@ batchSize = 50 ...@@ -41,6 +41,12 @@ batchSize = 50
apiSimple :: Maybe Limit -> [String] -> IO [Result] apiSimple :: Maybe Limit -> [String] -> IO [Result]
apiSimple limit query = execQuery limit $ simpleQuery query apiSimple limit query = execQuery limit $ simpleQuery query
apiSimpleC :: MonadResource m => Maybe Limit -> [String] -> IO (Int, C.ConduitT () Result m ())
apiSimpleC Nothing query = searchAxv' $ simpleQuery query
apiSimpleC (Just limit) query = do
(cnt, resC) <- searchAxv' $ simpleQuery query
pure (cnt, resC .| C.takeC limit)
-- | Complex Query search for terms in specific fields to be defined by Ax.Query -- | Complex Query search for terms in specific fields to be defined by Ax.Query
apiComplex :: Maybe Limit -> Ax.Query -> IO [Result] apiComplex :: Maybe Limit -> Ax.Query -> IO [Result]
apiComplex limit query = execQuery limit query apiComplex limit query = execQuery limit query
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment