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
93221100
Commit
93221100
authored
Sep 27, 2021
by
Przemyslaw Kaminski
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[search] successful search_title tsquery search
parent
ed758424
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
9 additions
and
12 deletions
+9
-12
Search.hs
src/Gargantext/Database/Action/Search.hs
+2
-7
Facet.hs
src/Gargantext/Database/Query/Facet.hs
+3
-3
stack.yaml
stack.yaml
+4
-2
No files found.
src/Gargantext/Database/Action/Search.hs
View file @
93221100
...
@@ -14,18 +14,13 @@ module Gargantext.Database.Action.Search where
...
@@ -14,18 +14,13 @@ module Gargantext.Database.Action.Search where
import
Control.Arrow
(
returnA
)
import
Control.Arrow
(
returnA
)
import
Control.Lens
((
^.
))
import
Control.Lens
((
^.
))
import
Data.Aeson
import
Data.List
(
intersperse
)
import
Data.Maybe
import
Data.Maybe
import
Data.String
(
IsString
(
..
))
import
Data.Text
(
Text
,
unpack
,
intercalate
)
import
Data.Text
(
Text
,
words
,
unpack
,
intercalate
)
import
Data.Time
(
UTCTime
)
import
Data.Time
(
UTCTime
)
import
Database.PostgreSQL.Simple
(
Query
)
import
Database.PostgreSQL.Simple.ToField
import
Gargantext.Core
import
Gargantext.Core
import
Gargantext.Core.Types
import
Gargantext.Core.Types
import
Gargantext.Database.Admin.Types.Hyperdata
(
HyperdataDocument
(
..
),
HyperdataContact
(
..
))
import
Gargantext.Database.Admin.Types.Hyperdata
(
HyperdataDocument
(
..
),
HyperdataContact
(
..
))
import
Gargantext.Database.Prelude
(
Cmd
,
run
PGSQuery
,
run
OpaQuery
,
runCountOpaQuery
)
import
Gargantext.Database.Prelude
(
Cmd
,
runOpaQuery
,
runCountOpaQuery
)
import
Gargantext.Database.Query.Facet
import
Gargantext.Database.Query.Facet
import
Gargantext.Database.Query.Filter
import
Gargantext.Database.Query.Filter
import
Gargantext.Database.Query.Join
(
leftJoin5
)
import
Gargantext.Database.Query.Join
(
leftJoin5
)
...
...
src/Gargantext/Database/Query/Facet.hs
View file @
93221100
...
@@ -61,7 +61,7 @@ import qualified Opaleye.Internal.Unpackspec()
...
@@ -61,7 +61,7 @@ import qualified Opaleye.Internal.Unpackspec()
import
Gargantext.Core
import
Gargantext.Core
import
Gargantext.Core.Types
import
Gargantext.Core.Types
import
Gargantext.Core.Utils.Prefix
(
unPrefix
,
unPrefixSwagger
,
wellNamedSchema
)
import
Gargantext.Core.Utils.Prefix
(
unPrefix
,
unPrefixSwagger
,
wellNamedSchema
)
import
Gargantext.Database.Action.TSQuery
(
toTSQuery
)
--
import Gargantext.Database.Action.TSQuery (toTSQuery)
import
Gargantext.Database.Admin.Types.Hyperdata
import
Gargantext.Database.Admin.Types.Hyperdata
import
Gargantext.Database.Query.Filter
import
Gargantext.Database.Query.Filter
import
Gargantext.Database.Query.Join
(
leftJoin5
)
import
Gargantext.Database.Query.Join
(
leftJoin5
)
...
@@ -359,8 +359,8 @@ viewDocuments cId t ntId mQuery = proc () -> do
...
@@ -359,8 +359,8 @@ viewDocuments cId t ntId mQuery = proc () -> do
-- restrict -< (n^.node_name) `ilike` (pgStrictText iLikeQuery)
-- restrict -< (n^.node_name) `ilike` (pgStrictText iLikeQuery)
restrict
-<
if
query
==
""
restrict
-<
if
query
==
""
then
pgBool
True
then
pgBool
True
else
(
n
^.
ns_search_title
)
@@
(
pgTSQuery
(
T
.
unpack
query
))
--
else (n^.ns_search_title) @@ (pgTSQuery (T.unpack query))
--else (n^.ns_search_title) @@ (toTSQuery [query]
)
else
(
n
^.
ns_search_title
)
@@
(
toTSQuery
$
T
.
unpack
query
)
returnA
-<
FacetDoc
(
_ns_id
n
)
returnA
-<
FacetDoc
(
_ns_id
n
)
(
_ns_date
n
)
(
_ns_date
n
)
...
...
stack.yaml
View file @
93221100
...
@@ -43,8 +43,10 @@ extra-deps:
...
@@ -43,8 +43,10 @@ extra-deps:
commit
:
8cb8aaf2962ad44d319fcea48442e4397b3c49e8
commit
:
8cb8aaf2962ad44d319fcea48442e4397b3c49e8
# Databases libs
# Databases libs
-
git
:
https://github.com/delanoe/haskell-opaleye.git
#- opaleye-0.6.7002.0
#- git: https://github.com/delanoe/haskell-opaleye.git #- opaleye-0.6.7002.0)
commit
:
63ee65d974e9d20eaaf17a2e83652175988cbb79
# commit: 63ee65d974e9d20eaaf17a2e83652175988cbb79
-
git
:
https://github.com/cgenie/haskell-opaleye.git
commit
:
41e3212e7da83d295cd6d0fa4f0a2b55b86bbbca
-
git
:
https://github.com/delanoe/hsparql.git
-
git
:
https://github.com/delanoe/hsparql.git
commit
:
308c74b71a1abb0a91546fa57d353131248e3a7f
commit
:
308c74b71a1abb0a91546fa57d353131248e3a7f
-
git
:
https://github.com/robstewart57/rdf4h.git
-
git
:
https://github.com/robstewart57/rdf4h.git
...
...
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