@@ -256,8 +256,13 @@ let query = TermQuery (Term "user" "bitemyapp") Nothing
256-- <||> (or/plus) should make it into a search that returns everything.
256-- <||> (or/plus) should make it into a search that returns everything.
258let filter = IdentityFilter <&&> IdentityFilter
258let filter = IdentityFilter <&&> IdentityFilter
260+-- constructing the search object the searchByIndex function dispatches on.
259let search = mkSearch (Just query) (Just filter)
261let search = mkSearch (Just query) (Just filter)
263+-- you can also searchByType and specify the mapping name.
260reply <- searchByIndex testServer testIndex search
264reply <- searchByIndex testServer testIndex search
261let result = eitherDecode (responseBody reply) :: Either String (SearchResult Tweet)
266let result = eitherDecode (responseBody reply) :: Either String (SearchResult Tweet)
263λ> fmap (hits . searchHits) result
268λ> fmap (hits . searchHits) result