packages feed

esqueleto-textsearch 1.2.0 → 1.2.1

raw patch · 3 files changed

+7/−8 lines, 3 filesPVP ok

version bump matches the API change (PVP)

API changes (from Hackage documentation)

Files

Changelog.md view
@@ -1,5 +1,8 @@ # Change log for esqueleto text search  +## Version 1.2.1++ Update misleading docs+ ## Version 1.2.0 + Add prefix or query. + expose binops on tsquery
esqueleto-textsearch.cabal view
@@ -1,6 +1,6 @@ cabal-version:      3.0 name:               esqueleto-textsearch-version:            1.2.0+version:            1.2.1 synopsis:           PostgreSQL full text search for Esqueleto description:        PostgreSQL text search functions for Esqueleto. homepage:           https://github.com/jappeace/esqueleto-textsearch
src/Database/Esqueleto/TextSearch/Language.hs view
@@ -177,13 +177,9 @@ toSearchTerm :: Text -> Maybe SearchTerm toSearchTerm = toSearchTermWeighted [] --- | create a search term with some weight, this allows tweaking of priority of certain terms.---   for example if you want to do some post processing on user input.---   where they insist on typing dashes,---   you split on the dash and concatinate the search term with lower---   priority splitted strings on the dash.---   so the full string is high priority, substrings lower.---   use the semigroup instance on search term to combine these.+-- | create a search term with some weight, this allows for restricting on specific weighs.+--   see: https://www.postgresql.org/docs/current/textsearch-controls.html#TEXTSEARCH-PARSING-QUERIES+--   use the semigroup instance on search term to combine searchterms. toSearchTermWeighted :: [Weight] -> Text -> Maybe SearchTerm toSearchTermWeighted weights q = SearchTerm .  fmap (Word Prefix weights) <$> nonEmpty qs   -- We disallow whitespace, \ and ' for the sake of producing a Text