better search
This commit is contained in:
parent
9ce192b1a7
commit
a723b0b62a
2 changed files with 6 additions and 3 deletions
|
@ -31,8 +31,11 @@ getSearchR = do
|
|||
searchForm
|
||||
case res of
|
||||
FormSuccess query -> do
|
||||
mediumList <- runDB $
|
||||
rawSql "select ?? from medium where title % ?" [PersistText query]
|
||||
mediumList <- runDB $ (++)
|
||||
rawSql "select ?? from medium where any(string_to_array(title, ' ') % ?"
|
||||
[PersistText query]
|
||||
rawSql "select ?? from medium where any(string_to_array(description, ' ') % ?"
|
||||
[PersistText query]
|
||||
userList <- runDB $
|
||||
rawSql "select ?? from \"user\" where name % ?" [PersistText query]
|
||||
albumList <- runDB $
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
name: eidolon
|
||||
version: 0.1.11.3
|
||||
version: 0.1.11.4
|
||||
synopsis: Image gallery in Yesod
|
||||
homepage: https://eidolon.nek0.eu
|
||||
license: AGPL-3
|
||||
|
|
Loading…
Reference in a new issue