New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
removing Search::Elasticsearch #64
Conversation
d3d9c06
to
19cc83f
Compare
size => 1000, | ||
body => $body, | ||
%{ $params }, | ||
my $scroller = MetaCPAN::Client::Scroll->new( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
test
I think this is a good idea. S::Es is a huge complex module and we don't really need that complexity. |
19cc83f
to
56e7b94
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Seems like a reasonable change. Any reason not to use Type::Tiny?
@@ -347,5 +337,5 @@ Fetches a path from MetaCPAN (post or get), and returns the decoded result. | |||
|
|||
=head2 ssearch | |||
|
|||
Calls an Elastic Search query (using L<Search::Elasticsearch> and returns an | |||
L<Search::Elasticsearch::Scroll> scroller object. | |||
Calls an Elastic Search query and returns an L<MetaCPAN::Client::Scroll> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
s/Elastic Search/Elasticsearch/
56e7b94
to
6c2f964
Compare
@oalders AFAIK |
Created an internall scroller for the client. We only use this one feature (scrolled searches) and we have it as a dependency to function as an API to an API we could just use directly. The motivation is the breaking changes in latest 5.x versions of Search::Elasticsearch and the fact it's incompatiable with the current client code.
6c2f964
to
f69c112
Compare
|
Oh, and for the record, I discussed this topic with @mickeyn, and I support it too. |
Type::Tiny works fine on 5.24, but fails its tests on 5.26. We're working on getting that resolved though. |
@oalders please check the latest changes, added type checking. hope it's what you meant. |
@mickeyn looks good to me. Bonus points for creating a type library! |
i'll follow @haarg's advice and convert it to use |
63d55d3
to
60eb8ae
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks sane to me. Ditching the Search::Elasticsearch is a good idea. Working directly with the HTTP API is simpler than dealing with another layer of abstraction.
#55 and other complaints regarding this issue convinced me we got to get rid of the S::Es usage (we only use it for scrolled searches) - it's a pain and its current (and probably future) breaking changes will only make it even more of a nightmare.
As I see it, while we don't upgrade to it, we have some users (+testers) having issues with it. if we do, we open a can of worms and will have to support all issues people will have with it (we will have to force them to upgrade, as the same code doesn't work on both 2.03 and 5.x).
I figured it's just an API to an API to I'm using the destination one directly here.