Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
haskell-gargantext
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
158
Issues
158
List
Board
Labels
Milestones
Merge Requests
11
Merge Requests
11
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
haskell-gargantext
Commits
c5f488c7
Commit
c5f488c7
authored
Dec 13, 2018
by
Alexandre Delanoë
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[FIX] SQL query OR.
parent
e5ad8435
Pipeline
#66
failed with stage
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
2 deletions
+2
-2
TextSearch.hs
src/Gargantext/Database/TextSearch.hs
+2
-2
No files found.
src/Gargantext/Database/TextSearch.hs
View file @
c5f488c7
...
...
@@ -57,7 +57,7 @@ queryInDatabase _ q = proc () -> do
searchInCorpus
::
Connection
->
CorpusId
->
[
Text
]
->
Maybe
Offset
->
Maybe
Limit
->
Maybe
OrderBy
->
IO
[
FacetDoc
]
searchInCorpus
c
cId
q
o
l
order
=
runQuery
c
(
filterWith
o
l
order
$
queryInCorpus
cId
q'
)
where
q'
=
intercalate
" |
|
"
$
map
stemIt
q
q'
=
intercalate
" | "
$
map
stemIt
q
queryInCorpus
::
CorpusId
->
Text
->
O
.
Query
FacetDocRead
queryInCorpus
cId
q
=
proc
()
->
do
...
...
@@ -92,7 +92,7 @@ searchInCorpusWithContacts c cId q o l order = take (maybe 5 identity l) <$> dro
searchInCorpusWithContacts'
::
Connection
->
CorpusId
->
[
Text
]
->
Maybe
Offset
->
Maybe
Limit
->
Maybe
OrderBy
->
IO
[(
FacetPaired
Int
UTCTime
HyperdataDocument
Int
(
Pair
(
Maybe
Int
)
(
Maybe
Text
)))]
searchInCorpusWithContacts'
c
cId
q
o
l
order
=
runQuery
c
$
queryInCorpusWithContacts
cId
q'
o
l
order
where
q'
=
intercalate
" |
|
"
$
map
stemIt
q
q'
=
intercalate
" | "
$
map
stemIt
q
...
...
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