Commit Graph

543 Commits

Author SHA1 Message Date
MHova
193c50af9d Revert to original TermsResult FromJSON instance
For the sake of changing as little as possible
2016-01-21 11:04:47 -05:00
MHova
8f0a40ced2 Retain specific key data type in BucketAggregation 2016-01-21 11:04:47 -05:00
MHova
cba1a574c3 Move disparate termKey types out of TermsResult and into own type 2016-01-21 11:04:46 -05:00
Michael Xavier
ccb32015ff Remove errant "haskell" tokens from readme 2016-01-20 19:02:09 -08:00
MHova
cbb9531377 Support Bool and Numeric keys in TermsResults 2016-01-20 19:12:09 -05:00
Chris Allen
c3df59771b Merge pull request #84 from Soostone/request-hook
Add Request hook
2015-12-27 07:33:11 -06:00
Chris Allen
3fe391f4ad Merge pull request #85 from MailOnline/master
Add updateDocument
2015-12-27 07:32:10 -06:00
Dmitry Dzhus
f20a8b7f7d Test _update API 2015-12-22 17:28:23 +00:00
Dmitry Dzhus
f5c51d7835 Add updateDocument 2015-12-22 16:37:35 +00:00
Michael Xavier
218b407c4f Update Internal.hs 2015-12-05 10:15:58 -08:00
Michael Xavier
04eef56a52 Add Applicative for old-timers 2015-12-04 09:51:36 -08:00
Michael Xavier
77ca160a69 Principle of least power. Use Monad m, not IO. 2015-12-04 09:35:08 -08:00
Michael Xavier
e75b167d9d Don't use searchAll in test
This is probably fine for travis but if you have an elastic search
service running with other data in it, it will break the test suite.
2015-12-04 09:30:50 -08:00
Michael Xavier
febfae7793 Implement basic auth hook 2015-12-04 09:18:34 -08:00
Michael Xavier
8801a3e580 simplify type to IO 2015-12-03 15:47:24 -08:00
Michael Xavier
b8116737a0 Initial work in request hooks.
Going to take this and dogfood for a bit to see how well it works for
AWS request signing.
2015-12-02 16:08:23 -08:00
Chris Allen
8ee8de0bc8 version bump, push for validation 2015-11-23 00:18:37 -06:00
Chris Allen
f985765111 changelog 2015-11-23 00:02:21 -06:00
Chris Allen
0b116a0284 Merge pull request #82 from Soostone/date-range-agg
Date range agg
2015-11-18 19:50:08 -06:00
Michael Xavier
10666e6b17 Loosen IndexAliasesSummary
Looks like 1.4.1 produces different outputs (namely an empty object
instead of {aliases: null}), even though 1.4.5 does the right
thing. This should hopefully clear up the one sticking case in the
travis build.
2015-11-18 16:12:55 -08:00
Michael Xavier
8a8492dfdd Travis-driven-development 2015-11-18 15:52:19 -08:00
Michael Xavier
8f7ca41582 Try to debug travis errors on some ES versions 2015-11-18 15:36:42 -08:00
Michael Xavier
5395a0b294 add missing Typeables 2015-11-16 11:26:08 -08:00
Michael Xavier
a27cec5fda Finish up index settings feature 2015-11-16 11:05:46 -08:00
Michael Xavier
e28dd023b6 WIP index settings parser tests
Some parses are ambiguously ordered by nature, so tests are unduely
failing. I'm going to need to create a typeclass like ApproxEq that is
order-ivariant in some cases.
2015-11-14 19:54:01 -08:00
Chris Allen
d1b4b7cd25 Merge remote-tracking branch 'origin/index-aliases' 2015-11-14 21:35:44 -06:00
Michael Xavier
43523a4a2c Merge remote-tracking branch 'origin/update-index-settings' into date-range-agg 2015-11-14 14:16:42 -08:00
Michael Xavier
6a2503f3f7 Loosen errors dependency
2.0 changed EitherT to ErrorT, but we don't use that so we should be okay.
2015-11-14 14:08:19 -08:00
Michael Xavier
4269d2787b Add date_range aggregation
Note that this commit is based off of the low-level-scroll PR as a
starting point.
2015-11-13 16:23:45 -08:00
Chris Allen
df776d4842 new semigroups 2015-11-10 23:31:13 -06:00
Michael Xavier
6f38ff01af parseEsResponse doesn't need MonadBH 2015-11-05 11:32:43 -08:00
Michael Xavier
ce535e8f37 Merge remote-tracking branch 'origin/index-aliases' into low-level-scroll 2015-11-05 10:45:52 -08:00
Michael Xavier
39e49f85f6 Expose low-level scroll API
Changes in this commit:
- Put a note on scanSearch's runtime properties
- Resolve a "todo" making ScrollId a proper newtype.
- Add low level api calls for getInitialScroll and advanceScroll, with
which scanSearch is now implemented.

'scanSearch' provides a high level but pretty limited functionality. It
scans over the entire search range and appends hits into a list. There
are a few problems with this approach:

1. It uses lazy lists and O(n) appends on each page fetched. This
probably isn't a big deal for small results sets but for larger ones
this could get inefficient. Which brings me to
2. It collects all the results in memory, so in general its not suitable
for large data sets anyways.
3. The scroll window was fixed to 1 minute. That's a reasonable default
but this isn't a decision that the library can make categorically.
4. *only* scanSearch was exported, making it impossible to perform a
scrolling search if you wanted something more efficient.

This change leaves scanSearch how it is but adds getInitialScroll and
advanceScroll which can be easily used to create a
pipes/conduits/what-have-you stream of hits. The only semantic changes
are:

1. ScrollId is now a newtype as originally intended by the feature's
author.
2. MonadThrow has been introduced into the type signature for
the (AFAIK) impossible edge case of the server returning a response that
can't be parsed as an EsError.
2015-11-05 10:30:44 -08:00
Chris Allen
2612b75668 Merge pull request #80 from Soostone/index-aliases
Index aliases
2015-11-04 15:02:32 -06:00
Michael Xavier
bb72983e48 Fix busted doctests for updateIndexAliases 2015-11-04 08:35:00 -08:00
Michael Xavier
6faa544839 Hopefully resolve type error in doctests
Doctests won't even run for me due to some sort of env issue, so I'm
afraid I've resorted to debug-via-travis.
2015-11-03 20:03:30 -08:00
Michael Xavier
8d75ef9f7c Forgot a few Typeables 2015-11-03 19:51:46 -08:00
Michael Xavier
0137a8eb3c Everybody gets a Typeable! 2015-11-03 19:44:57 -08:00
Michael Xavier
53f4095b53 Add some finishing touches 2015-11-02 19:34:58 -08:00
Michael Xavier
0663f0306d Merge branch 'master' into index-aliases 2015-10-29 22:18:00 -07:00
Michael Xavier
5513b473bd Add example for updateIndexAliases
Can't run it locally right now. Doctests seems to get 2 different
versions of http-types. Sweet.
2015-10-29 22:16:27 -07:00
Chris Allen
d4e70617b0 bump copyright 2015-10-29 15:18:02 -05:00
Chris Allen
f5b89b1090 merged 2015-10-29 14:54:31 -05:00
Chris Allen
a8401fcf0f cache pls 2015-10-29 14:54:07 -05:00
Michael Xavier
27e244e9d1 Fix bugs with constant score filter/queries 2015-10-28 19:47:03 -07:00
Michael Xavier
1bffa02a16 All parsing tests passing now! 2015-10-28 19:13:29 -07:00
Chris Allen
68abd07509 they changed URL scheme. sigh 2015-10-28 19:49:53 -05:00
Chris Allen
eb97a83232 lets see if 2.0.0 works 2015-10-28 19:37:56 -05:00
Chris Allen
e28b0454de background the server 2015-10-28 19:19:40 -05:00
Chris Allen
b24546efd4 no dash 2015-10-28 19:17:11 -05:00