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

Incorrect query params #10

Closed
silamon opened this issue Dec 27, 2021 · 4 comments
Closed

Incorrect query params #10

silamon opened this issue Dec 27, 2021 · 4 comments

Comments

@silamon
Copy link

silamon commented Dec 27, 2021

We're having problems fetching any other page than the default page for the list engine operation with the last published version.

Looking at the code, it looks like the query_params are incorrect on some release branches:
https://github.com/elastic/enterprise-search-php/blob/7.15/src/AppSearch/Request/ListEngines.php

While the code on the master branch uses the correct query_params:
https://github.com/elastic/enterprise-search-php/blob/master/src/AppSearch/Request/ListEngines.php

And one of the older releases uses the correct query_params as well:
https://github.com/elastic/enterprise-search-php/blob/7.14/src/AppSearch/Request/ListEngines.php

Relevant documentation: https://www.elastic.co/guide/en/app-search/7.15/engines.html#engines-query-list

@ezimuel
Copy link
Contributor

ezimuel commented Jan 13, 2022

@silamon can you report the versions of enterprise-search-php and App Search server that you are using?
The query parametes can be also passed in the body (as reported here). From 7.15 we changed all the query parameters of enterprise-search-php to be passed in the body, to prevent issue like #4.
Can you report the error message of the issue? Thanks!

@silamon
Copy link
Author

silamon commented Jan 13, 2022

We're using 7.16 for app search and 7.16 for enterprise search php. When we want to fetch the second or third page, we always receive the first page as if the parameter we've sent using ListEngines -> SetCurrentPage is ignored.
We're now using 7.14 for enterprise search php which works for us.

Relevant code:
https://github.com/elastic/enterprise-search-php/blob/7.16/src/AppSearch/Request/ListEngines.php#L43

EDIT: "current_page" isn't mentioned anywhere, not in the query params documentation and not in the body documentation.

@ezimuel
Copy link
Contributor

ezimuel commented Jan 31, 2022

@silamon the issue has been fixed in 7.16.0 release. Please check and let me know, thanks.

@silamon
Copy link
Author

silamon commented Feb 9, 2022

Thank you for looking into this! Very much appreciated! 👍

@silamon silamon closed this as completed Feb 9, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants