Skip to content

Search REST API returns wrong total_count #17295

Closed
@mohamed-karam

Description

@mohamed-karam

Preconditions

  1. Magento 2.2.2

Steps to reproduce

  1. Make a request to endpoint GET /V1/search and provide searchCriteria[pageSize].
  2. Repeat the previous point with searchCiteria[currentPage] = 2

Expected result

  1. You will get a response with number of items equals searchCriteria[pageSize] in the first time
  2. You will get a response with number of items <= searchCriteria[pageSize] in the second time
  3. The total_count is the same on both requests

Actual result

The value of total_count equals searchCriteria[pageSize] not the total count of the search result items.

Metadata

Metadata

Assignees

Labels

Component: Framework/ApiUSE ONLY for FRAMEWORK RELATED BUG! E.g If bug related to Catalog Service Contracts use just CatalogComponent: SearchFixed in 2.3.xThe issue has been fixed in 2.3 release lineIssue: Clear DescriptionGate 2 Passed. Manual verification of the issue description passedIssue: ConfirmedGate 3 Passed. Manual verification of the issue completed. Issue is confirmedIssue: Format is validGate 1 Passed. Automatic verification of issue format passedIssue: Ready for WorkGate 4. Acknowledged. Issue is added to backlog and ready for developmentReproduced on 2.2.xThe issue has been reproduced on latest 2.2 releaseReproduced on 2.3.xThe issue has been reproduced on latest 2.3 release

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions