Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
H
haskell-gargantext
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
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
Przemyslaw Kaminski
haskell-gargantext
Commits
d807de52
Commit
d807de52
authored
Jan 06, 2022
by
Alexandre Delanoë
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[FIX] Search in abstrct
MR:
gargantext/haskell-gargantext!53
parent
bb79271d
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
14 additions
and
5 deletions
+14
-5
Ngrams.hs
src/Gargantext/API/Ngrams.hs
+1
-1
Facet.hs
src/Gargantext/Database/Query/Facet.hs
+13
-4
No files found.
src/Gargantext/API/Ngrams.hs
View file @
d807de52
src/Gargantext/Database/Query/Facet.hs
View file @
d807de52
...
...
@@ -360,12 +360,21 @@ viewDocumentsQuery cId t ntId mQuery = proc () -> do
restrict
-<
c
^.
cs_typename
.==
(
sqlInt4
ntId
)
restrict
-<
if
t
then
nc
^.
nc_category
.==
(
sqlInt4
0
)
else
nc
^.
nc_category
.>=
(
sqlInt4
1
)
let
query
=
(
fromMaybe
""
mQuery
)
restrict
-<
if
query
==
""
then
sqlBool
True
else
(
c
^.
cs_search
)
@@
(
plaintoTSQuery
$
T
.
unpack
query
)
let
query
=
(
fromMaybe
""
mQuery
)
iLikeQuery
=
T
.
intercalate
""
[
"%"
,
query
,
"%"
]
abstractLHS
h
=
fromNullable
(
sqlStrictText
""
)
$
toNullable
h
.->>
(
sqlStrictText
"abstract"
)
restrict
-<
if
query
==
""
then
sqlBool
True
else
((
c
^.
cs_name
)
`
ilike
`
(
sqlStrictText
iLikeQuery
))
.||
((
abstractLHS
(
c
^.
cs_hyperdata
))
`
ilike
`
(
sqlStrictText
iLikeQuery
))
returnA
-<
(
c
,
nc
)
------------------------------------------------------------------------
filterWith
::
(
SqlOrd
date
,
SqlOrd
title
,
SqlOrd
category
,
SqlOrd
score
,
hyperdata
~
Column
SqlJsonb
)
=>
Maybe
Gargantext
.
Core
.
Types
.
Offset
...
...
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