Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
H
hal
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
3
Issues
3
List
Board
Labels
Milestones
Merge Requests
2
Merge Requests
2
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
gargantext
crawlers
hal
Commits
f45d6b92
Commit
f45d6b92
authored
Apr 14, 2022
by
Alexandre Delanoë
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[FIX] query
parent
9a434702
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
10 additions
and
7 deletions
+10
-7
Main.hs
app/Main.hs
+9
-6
HAL.hs
src/HAL.hs
+1
-1
No files found.
app/Main.hs
View file @
f45d6b92
...
...
@@ -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
...
...
src/HAL.hs
View file @
f45d6b92
...
...
@@ -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
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment