Commit Graph

569 Commits

Author SHA1 Message Date
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
Chris Allen
972a80077c expand the tarball, derp 2015-10-28 19:17:00 -05:00
Chris Allen
57f1cd5b09 for the love of god travis 2015-10-28 19:15:33 -05:00
Chris Allen
c2403987a8 ls the directory during install 2015-10-28 19:14:15 -05:00
Chris Allen
bc93324bbc Fix URL 2015-10-28 19:13:18 -05:00
Chris Allen
0ad40b460f containerize pls 2015-10-28 19:10:54 -05:00
Michael Xavier
4768fbdabf Make some disambiguating type changes
Tests are now passing for very small sets. Tests otherwise take an
eternity. May need to manually specify instances for Query and Filter to
explicitly put in size reduction.
2015-10-27 21:50:37 -07:00
Michael Xavier
1241ec3a5e WIP: squashme 2015-10-26 18:44:35 -07:00
Michael Xavier
e07c0c460e Add test for simple case of creating an alias
Once we I the failing quickcheck tests on the more complex alias case,
we can add a more complex integration test.
2015-10-26 09:06:02 -07:00
Michael Xavier
a72311a60b WIP: fix several bugs with parsers, more to go
Also caught a bug in one of the existing ToJSON instances
2015-10-23 22:05:39 -07:00
Michael Xavier
e2f991e862 JSON instances for aliases
Next up is quickcheck and fixing the bugs it discovers
2015-10-23 12:18:55 -07:00
Michael Xavier
ee94d8c0f3 WIP index aliases
I am now deep in a rabbit hole implementing FromJSON filter...
2015-10-22 16:52:35 -07:00
Michael Xavier
46d3e36478 Back out accidentally commenting out TH
Whoops
2015-10-21 17:49:09 -07:00
Chris Allen
5c24e8c410 warnings, old-locale 2015-10-19 11:30:54 -05:00
Chris Allen
c518b8ed7f warnings clean up 2015-10-19 11:17:40 -05:00
Michael Xavier
ee5cd9326a Lift documentation from ES for IndexSettingUpdate 2015-10-18 21:06:32 -07:00
Michael Xavier
0a667b820e Merge branch 'master' into update-index-settings 2015-10-18 20:17:10 -07:00
Michael Xavier
b0ba889937 WIP: add instances and public API 2015-10-18 20:16:41 -07:00
Chris Allen
a971422e58 drop time specification 2015-10-18 13:25:56 -05:00
Chris Allen
827157b547 boomp 2015-10-18 13:13:52 -05:00
Chris Allen
f438654761 update the package index 2015-10-18 13:04:28 -05:00
Chris Allen
b371e25158 fixed doctests 2015-10-18 13:00:14 -05:00
Chris Allen
5b66b7c2ba Merge pull request #77 from bitemyapp/doc-error-type
Add test for error parsing
2015-10-18 05:19:26 -05:00
Michael Xavier
7d4ffefc15 Add test for error parsing 2015-10-16 23:58:36 -07:00
Michael Xavier
9bc7ebdf83 WIP: update index settings 2015-10-16 23:16:20 -07:00