[GH-ISSUE #152] API-search with size parameter returns false amount of results #151

Closed
opened 2026-02-27 15:55:19 +03:00 by kerem · 3 comments
Owner

Originally created by @thieren on GitHub (May 3, 2018).
Original GitHub issue: https://github.com/RD17/ambar/issues/152

Hey there,

i'm still on 1.2 but can't upgrade just yet, because a clean install is necessary.

That said, if i do an api-search (e.g. http://ambarip/api/search?query=*&size=10) then i get a result-JSON with 20 hits (on the first page). If i do this with size=3 then i get 6 hits and so on.

This continues on page 2, 3 until at a varying page it returns to the default behaviour (e.g. size=3 and returns 3 hits). On which site the standard behaviour starts depends on the search term.

I assume that this is a bug. Can anyone tell me if this is adressed in newer versions?

Thanks in advance!

Originally created by @thieren on GitHub (May 3, 2018). Original GitHub issue: https://github.com/RD17/ambar/issues/152 Hey there, i'm still on 1.2 but can't upgrade just yet, because a clean install is necessary. That said, if i do an api-search (e.g. http://ambarip/api/search?query=*&size=10) then i get a result-JSON with 20 hits (on the first page). If i do this with size=3 then i get 6 hits and so on. This continues on page 2, 3 until at a varying page it returns to the default behaviour (e.g. size=3 and returns 3 hits). On which site the standard behaviour starts depends on the search term. I assume that this is a bug. Can anyone tell me if this is adressed in newer versions? Thanks in advance!
kerem 2026-02-27 15:55:19 +03:00
Author
Owner

@sochix commented on GitHub (May 3, 2018):

@Thieri85 hi, it is not a bug. We perform two search queries each time, First for small files and second for large files, that's why you got different number of results. We plan to replace two queries with one in the feature, but to do it we need to develop some new way to handle large files in ES.

<!-- gh-comment-id:386252915 --> @sochix commented on GitHub (May 3, 2018): @Thieri85 hi, it is not a bug. We perform two search queries each time, First for small files and second for large files, that's why you got different number of results. We plan to replace two queries with one in the feature, but to do it we need to develop some new way to handle large files in ES.
Author
Owner

@thieren commented on GitHub (May 3, 2018):

Ok, at least this explains the issue.

But this brings me to the next question: is there a way to determine the total number of pages for a given query? I would need this information for my use case because i'd like to let the user navigate to specific pages of a search result.

<!-- gh-comment-id:386264419 --> @thieren commented on GitHub (May 3, 2018): Ok, at least this explains the issue. But this brings me to the next question: is there a way to determine the total number of pages for a given query? I would need this information for my use case because i'd like to let the user navigate to specific pages of a search result.
Author
Owner

@stale[bot] commented on GitHub (Sep 10, 2018):

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

<!-- gh-comment-id:419949992 --> @stale[bot] commented on GitHub (Sep 10, 2018): This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/ambar#151
No description provided.