Copyright | Copyright (C) 2007, 2008 Timo B. Huebel |
---|---|
License | MIT |
Maintainer | Timo B. Huebel (tbh@holumbus.org) |
Stability | experimental |
Portability | portable |
Safe Haskell | None |
Language | Haskell98 |
Version : 0.2
The Hunt query parser, based on the famous Parsec library.
The parser implements a default syntax for the query grammar which exposes all possible query types and operators to the user.
Syntax:
AND
,OR
,AND NOT
- = combinatory queries
!w
- = case sensitive prefix query e.g.:
!car
or!Car
~w
- = fuzzy word query e.g.:
~car
or~cra
"..."
- = phrase query, performs an exact search for a single word
(...)
- = brackets
c:w
- = context sensitive queries e.g.:
(who:Rudi Voeller)
c1,c2:w
- = multi context queries e.g.:
(content,who,title:Rudi Voeller)
- @[... TO ...\
] = range queries e.g.:
[2014-02-10 TO 2012-02-16]@w^b
- = query boosting e.g.:
toList OR toAscList^1.5
- parseQuery :: String -> Either Text Query