gregwebs/haskell-sphinx-client — Issue #4: Exception: too few bytes
Author: pbrisbin
Created: 2012-01-16 20:14:10+00:00
State: open

Arch has two sphinx packages in the repos: sphinx-release (0.9.9) and sphinx-svn which is development snapshot. I've tried with either package and a fresh `cabal install` of 0.5.2.1.

Sample code:

~~~ { .haskell }
import Prelude
import Text.Search.Sphinx
import Text.Search.Sphinx.Types

main :: IO ()
main = do
-- index exists, and "brighton" returns results when using
-- the 'search' CLI tool
res <- query config "renters-idx" "brighton"
putStrLn $ show res

config = defaultConfig
{ port = 9312
, mode = Any
}
~~~

Error message from ghci:

`*** Exception: too few bytes. Failed reading at byte position 2`

What's seen in searchd logs:

`WARNING: failed to receive client request body (client=127.0.0.1:37954, exp=159)`

If you need other details, please let me know.