Skip to content
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

Merged
merged 2 commits into from Dec 24, 2016
Merged

removing Search::Elasticsearch #64

merged 2 commits into from Dec 24, 2016

Conversation

mickeyn
Copy link
Contributor

@mickeyn mickeyn commented Dec 20, 2016

#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.

size => 1000,
body => $body,
%{ $params },
my $scroller = MetaCPAN::Client::Scroll->new(
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

test

@haarg
Copy link
Member

haarg commented Dec 20, 2016

I think this is a good idea. S::Es is a huge complex module and we don't really need that complexity.

Copy link
Member

@oalders oalders left a 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>
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

s/Elastic Search/Elasticsearch/

@mickeyn
Copy link
Contributor Author

mickeyn commented Dec 20, 2016

@oalders AFAIK Type::Tiny doesn't work on 5.24 and also has issues on Windows.

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.
@xsawyerx
Copy link
Contributor

Type::Tiny isn't really maintained anymore. (The maintainer is mostly AWOL, but responsive enough to not justify a request to reassign permissions.) In Dancer2, we had to revert our code that used it.

@xsawyerx
Copy link
Contributor

Oh, and for the record, I discussed this topic with @mickeyn, and I support it too.

@haarg
Copy link
Member

haarg commented Dec 20, 2016

Type::Tiny works fine on 5.24, but fails its tests on 5.26. We're working on getting that resolved though.

@mickeyn
Copy link
Contributor Author

mickeyn commented Dec 22, 2016

@oalders please check the latest changes, added type checking. hope it's what you meant.

@oalders
Copy link
Member

oalders commented Dec 22, 2016

@mickeyn looks good to me. Bonus points for creating a type library!

@mickeyn
Copy link
Contributor Author

mickeyn commented Dec 22, 2016

i'll follow @haarg's advice and convert it to use Type::Standard, but i'll keep it within the library.

Copy link

@reyjrar reyjrar left a 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.

@mickeyn mickeyn merged commit 60eb8ae into master Dec 24, 2016
@mickeyn mickeyn deleted the mickey/wip_remove_ses branch December 25, 2016 00:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

6 participants