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
Api/changes #13
Api/changes #13
Conversation
index => 'v0', | ||
type => 'author', | ||
my $scroller = es()->scroll_helper( | ||
search_type => "scan", |
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.
You've switched all of the single quotes to double quotes here (and in other places). Let's only use double quotes where there's interpolation (a variable being inserted into the quotes). Could you change this in all of the appropriate places?
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.
@oalders Oh yes, I hadn't checked my changes properly. My bad.
@oalders Please let me know if further editing is required. |
p $search; | ||
say '#' x 80; | ||
while ( my $author = $search->next ) { | ||
p $search; |
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.
Have you tried running this? This is the output I get:
~/Documents/github/metacpan-examples ∙ ./bin/carton scripts/endpoints/author/1a-search-authors-mcpan-api.pl
raw results
################################################################################
MetaCPAN::Client::ResultSet {
Parents Moo::Object
public methods (6) : facets, new, next, scroller, total, type
private methods (2) : _assert_scroller, _get_facets
internals: {
scroller => Search::Elasticsearch::Scroll,
type => "author",
}
}
MetaCPAN::Client::ResultSet {
Parents Moo::Object
public methods (6) : facets, new, next, scroller, total, type
private methods (2) : _assert_scroller, _get_facets
internals: {
scroller => Search::Elasticsearch::Scroll,
type => "author",
}
}
################################################################################
Total matches: 2
The original script provided the author fields. In this case you're printing a resultset object, which doesn't really tell us anything about the author. The point of the print is to show the user which available fields they would be getting etc, so I think we need to preserve that.
So close! |
@oalders : I have made all the changes to the scripts in this pull requests. And tidied everything.
Please have a look at it.