Commit f45d6b92 authored by Alexandre Delanoë's avatar Alexandre Delanoë

[FIX] query

parent 9a434702
......@@ -17,13 +17,15 @@ import qualified Data.Text as T
yearReq = [text|
(language_t:en)
AND (producedDateY_i:2015
OR producedDateY_i:2016
OR producedDateY_i:2017
OR producedDateY_i:2018
(language_t:en)
AND (producedDateY_i:2015
OR producedDateY_i:2016
OR producedDateY_i:2017
OR producedDateY_i:2018
OR producedDateY_i:2019
OR producedDateY_i:2020
OR producedDateY_i:2021
OR producedDateY_i:2022)
OR producedDateY_i:2022)
AND (structId_i:302102
OR structId_i:469216
OR structId_i:6279
......@@ -64,6 +66,7 @@ imt = [
main :: IO ()
main = do
-- res <- getMetadataWith (generateRequestByStructID "artificial intelligence" imt) (Just 0) (Just 55)
res <- getMetadataWith (generateRequestByStructID "artificial intelligence" imt) (Just 0) (Just 55)
case res of
(Left err) -> print err
......
......@@ -44,7 +44,7 @@ getMetadataWithC q start rows = do
rows' = fromMaybe _numFound rows
numResults = rows' - (fromIntegral start')
numPages = numResults `div` (fromIntegral batchSize) + 1
getPage :: Text -> Int -> Int -> IO [Corpus]
getPage q start pageNum = do
let offset = start + pageNum * batchSize
......
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