Safe Haskell | Safe-Inferred |
---|---|
Language | Haskell2010 |
Synopsis
- (@@.) :: SqlExpr (Value TsVector) -> SqlExpr (Value (TsQuery Lexemes)) -> SqlExpr (Value Bool)
- prefixAndQuery :: SearchTerm -> SqlExpr (Value (TsQuery Lexemes))
- toSearchTerm :: Text -> Maybe SearchTerm
- data SearchTerm
- to_tsvector :: IsString a => SqlExpr (Value RegConfig) -> SqlExpr (Value a) -> SqlExpr (Value TsVector)
- to_tsquery :: SqlExpr (Value RegConfig) -> SqlExpr (Value (TsQuery Words)) -> SqlExpr (Value (TsQuery Lexemes))
- plainto_tsquery :: SqlExpr (Value RegConfig) -> SqlExpr (Value Text) -> SqlExpr (Value (TsQuery Lexemes))
- ts_rank :: SqlExpr (Value Weights) -> SqlExpr (Value TsVector) -> SqlExpr (Value (TsQuery Lexemes)) -> SqlExpr (Value [NormalizationOption]) -> SqlExpr (Value Double)
- ts_rank_cd :: SqlExpr (Value Weights) -> SqlExpr (Value TsVector) -> SqlExpr (Value (TsQuery Lexemes)) -> SqlExpr (Value [NormalizationOption]) -> SqlExpr (Value Double)
- setweight :: SqlExpr (Value TsVector) -> SqlExpr (Value Weight) -> SqlExpr (Value TsVector)
Documentation
(@@.) :: SqlExpr (Value TsVector) -> SqlExpr (Value (TsQuery Lexemes)) -> SqlExpr (Value Bool) Source #
prefixAndQuery :: SearchTerm -> SqlExpr (Value (TsQuery Lexemes)) Source #
format the query into lexemes
the result can be used in @@.
for example:
where_ $ (index ^. UnitSearchIndexDocument) @@. prefixAndQuery query
toSearchTerm :: Text -> Maybe SearchTerm Source #
constructs a valid search query, removes a bunch of illegal characters and splits the terms for better results
data SearchTerm Source #
A valid search term
Instances
Show SearchTerm Source # | |
Defined in Database.Esqueleto.TextSearch.Language showsPrec :: Int -> SearchTerm -> ShowS # show :: SearchTerm -> String # showList :: [SearchTerm] -> ShowS # |
to_tsvector :: IsString a => SqlExpr (Value RegConfig) -> SqlExpr (Value a) -> SqlExpr (Value TsVector) Source #
to_tsquery :: SqlExpr (Value RegConfig) -> SqlExpr (Value (TsQuery Words)) -> SqlExpr (Value (TsQuery Lexemes)) Source #
plainto_tsquery :: SqlExpr (Value RegConfig) -> SqlExpr (Value Text) -> SqlExpr (Value (TsQuery Lexemes)) Source #
ts_rank :: SqlExpr (Value Weights) -> SqlExpr (Value TsVector) -> SqlExpr (Value (TsQuery Lexemes)) -> SqlExpr (Value [NormalizationOption]) -> SqlExpr (Value Double) Source #