-- Hoogle documentation, generated by Haddock -- See Hoogle, http://www.haskell.org/hoogle/ -- | Haskell bindings to the Sphinx full-text searching deamon. -- -- Haskell bindings to the Sphinx full-text searching deamon. This module -- is heavily inspired by the php and python client. @package sphinx @version 0.2 module Text.Search.Sphinx.Indexable data Indexable NumAttr :: Int -> Indexable StrAttr :: String -> Indexable Field :: String -> Indexable data SchemaType TField :: SchemaType TAttribute :: AttrType -> SchemaType data AttrType AString :: AttrType AInt :: AttrType type Id = Int class SphinxSchema a toDocument :: (SphinxSchema a) => a -> (Id, [(String, Indexable)]) schema :: (SphinxSchema a) => a -> [(String, SchemaType)] serialize :: (SphinxSchema a) => [a] -> Element module Text.Search.Sphinx.Types -- | Search commands data SearchdCommand ScSearch :: SearchdCommand ScExcerpt :: SearchdCommand ScUpdate :: SearchdCommand ScKeywords :: SearchdCommand searchdCommand :: SearchdCommand -> Int -- | Current client-side command implementation versions data VerCommand VcSearch :: VerCommand VcExcerpt :: VerCommand VcUpdate :: VerCommand VcKeywords :: VerCommand -- | Searchd status codes data Searchd Ok :: Searchd Error :: Searchd Retry :: Searchd Warning :: Searchd searchd :: Searchd -> Int -- | Match modes data MatchMode All :: MatchMode Any :: MatchMode Phrase :: MatchMode Boolean :: MatchMode Extended :: MatchMode Fullscan :: MatchMode Extended2 :: MatchMode matchMode :: MatchMode -> Int -- | Ranking modes (ext2 only) data Rank ProximityBm25 :: Rank Bm25 :: Rank None :: Rank WordCount :: Rank rank :: Rank -> Int -- | Sort modes data Sort Relevance :: Sort AttrDesc :: Sort AttrAsc :: Sort TimeSegments :: Sort SortExtended :: Sort Expr :: Sort sort :: Sort -> Int -- | Filter types data Filter Values :: Filter Range :: Filter FloatRange :: Filter filter :: Filter -> Int -- | Attribute types data AttrT AttrTInteger :: AttrT AttrTTimestamp :: AttrT AttrTOrdinal :: AttrT AttrTBool :: AttrT AttrTFloat :: AttrT AttrTMulti :: AttrT -- | Grouping functions data GroupByFunction Day :: GroupByFunction Week :: GroupByFunction Month :: GroupByFunction Year :: GroupByFunction Attr :: GroupByFunction AttrPair :: GroupByFunction groupByFunction :: GroupByFunction -> Int -- | The result of a query data SearchResult SearchResult :: [Match] -> Int -> Int -> [(ByteString, Int, Int)] -> SearchResult -- | The matches matches :: SearchResult -> [Match] -- | Total amount of matches retrieved on server by this query. total :: SearchResult -> Int -- | Total amount of matching documents in index. totalFound :: SearchResult -> Int -- | List of processed words with the number of docs and the number of -- hits. words :: SearchResult -> [(ByteString, Int, Int)] data Match Match :: Int64 -> Int -> [Attr] -> Match documentId :: Match -> Int64 documentWeight :: Match -> Int attributeValues :: Match -> [Attr] data Attr AttrMulti :: [Int] -> Attr AttrNum :: Int -> Attr instance Show Attr instance Show Match instance Show SearchResult instance Show GroupByFunction instance Enum GroupByFunction instance Show AttrT instance Show Filter instance Enum Filter instance Show Sort instance Enum Sort instance Show Rank instance Enum Rank instance Show MatchMode instance Enum MatchMode instance Show Searchd instance Enum Searchd instance Show VerCommand instance Show SearchdCommand instance Enum SearchdCommand instance Enum AttrT module Text.Search.Sphinx.Configuration -- | The configuration for a query data Configuration Configuration :: String -> Int -> [Int] -> Int -> Int -> MatchMode -> Rank -> Sort -> String -> Int -> Int -> String -> String -> GroupByFunction -> String -> Int -> Int -> Int -> Int -> [(String, Int)] -> Int -> [(String, Int)] -> Configuration -- | The hostname of the Sphinx daemon host :: Configuration -> String -- | The portnumber of the Sphinx daemon port :: Configuration -> Int -- | Per-field weights weights :: Configuration -> [Int] -- | How many records to seek from result-set start (default is 0) offset :: Configuration -> Int -- | How many records to return from result-set starting at offset (default -- is 20) limit :: Configuration -> Int -- | Query matching mode mode :: Configuration -> MatchMode -- | Ranking mode ranker :: Configuration -> Rank -- | Match sorting mode sort :: Configuration -> Sort -- | Attribute to sort by sortBy :: Configuration -> String -- | Minimum ID to match, 0 means no limit minId :: Configuration -> Int -- | Maximum ID to match, 0 means no limit maxId :: Configuration -> Int -- | Group-by sorting clause (to sort groups in result set with) groupBy :: Configuration -> String -- | Group-by count-distinct attribute groupSort :: Configuration -> String -- | Group-by function (to pre-process group-by attribute value with) groupByFunc :: Configuration -> GroupByFunction -- | Group-by attribute name groupDistinct :: Configuration -> String -- | Maximum number of matches to retrieve maxMatches :: Configuration -> Int -- | Cutoff to stop searching at cutoff :: Configuration -> Int -- | Distributed retries count retryCount :: Configuration -> Int -- | Distributed retries delay retryDelay :: Configuration -> Int -- | Per-index weights indexWeights :: Configuration -> [(String, Int)] -- | Maximum query time in milliseconds, 0 means no limit maxQueryTime :: Configuration -> Int -- | Per-field-name weights fieldWeights :: Configuration -> [(String, Int)] -- | This is the Haskell version of the Sphinx searchd client. module Text.Search.Sphinx -- | The configuration for a query data Configuration Configuration :: String -> Int -> [Int] -> Int -> Int -> MatchMode -> Rank -> Sort -> String -> Int -> Int -> String -> String -> GroupByFunction -> String -> Int -> Int -> Int -> Int -> [(String, Int)] -> Int -> [(String, Int)] -> Configuration -- | The hostname of the Sphinx daemon host :: Configuration -> String -- | The portnumber of the Sphinx daemon port :: Configuration -> Int -- | Per-field weights weights :: Configuration -> [Int] -- | How many records to seek from result-set start (default is 0) offset :: Configuration -> Int -- | How many records to return from result-set starting at offset (default -- is 20) limit :: Configuration -> Int -- | Query matching mode mode :: Configuration -> MatchMode -- | Ranking mode ranker :: Configuration -> Rank -- | Match sorting mode sort :: Configuration -> Sort -- | Attribute to sort by sortBy :: Configuration -> String -- | Minimum ID to match, 0 means no limit minId :: Configuration -> Int -- | Maximum ID to match, 0 means no limit maxId :: Configuration -> Int -- | Group-by sorting clause (to sort groups in result set with) groupBy :: Configuration -> String -- | Group-by count-distinct attribute groupSort :: Configuration -> String -- | Group-by function (to pre-process group-by attribute value with) groupByFunc :: Configuration -> GroupByFunction -- | Group-by attribute name groupDistinct :: Configuration -> String -- | Maximum number of matches to retrieve maxMatches :: Configuration -> Int -- | Cutoff to stop searching at cutoff :: Configuration -> Int -- | Distributed retries count retryCount :: Configuration -> Int -- | Distributed retries delay retryDelay :: Configuration -> Int -- | Per-index weights indexWeights :: Configuration -> [(String, Int)] -- | Maximum query time in milliseconds, 0 means no limit maxQueryTime :: Configuration -> Int -- | Per-field-name weights fieldWeights :: Configuration -> [(String, Int)] -- | The query function queries the Sphinx daemon. query :: Configuration -> String -> String -> IO SearchResult defaultConfig :: Configuration