/search/fieldQuery ignores from/size pagination parameters (returns repeated first page)
Affected module fieldQuery API - https://docs.open-metadata.org/v1.12.x/api-reference/discovery/field-query
Describe the bug
GET /api/v1/search/fieldQuery appears to ignore pagination parameters from and size, despite documentation stating both are supported.
For the same query, changing from (e.g. 0, 10, 20) returns the same first-page results repeatedly, and changing size does not affect returned page size as expected.
This causes duplicate rows when clients paginate by incrementing from.
To Reproduce
- Run the following request with from=0:
BASE_URL="https://<openmetadata-host>/api/v1"
AUTH_HEADER="Authorization: Bearer <token?"
curl -sS -H "$AUTH_HEADER" \
"$BASE_URL/search/fieldQuery?fieldName=databaseSchema.name&fieldValue=schema_name&index=table_search_index&from=0&size=10" \
| jq -r '.hits.hits[]._source.fullyQualifiedName'
- Run the same request with from=10:
curl -sS -H "$AUTH_HEADER" \
"$BASE_URL/search/fieldQuery?fieldName=databaseSchema.name&fieldValue=schema_name&index=table_search_index&from=10&size=10" \
| jq -r '.hits.hits[]._source.fullyQualifiedName'
- Compare outputs — they are identical (same FQNs in same order).
- Optional additional check (demonstrates page-size behavior):
curl -sS -H "$AUTH_HEADER" \
"$BASE_URL/search/fieldQuery?fieldName=databaseSchema.name&fieldValue=schema_name&index=table_search_index&from=0&size=50" \
| jq '.hits.hits | length'
Returned length remains around the default page size (e.g. 10), not requested size.
Expected behavior
- from should control offset into the result set.
- size should control number of hits returned.
- Requests with different from values should return different windows of results (until exhausted).
- Endpoint behavior should match API documentation.
Version:
- OS: Linux (Ubuntu)
- Python version: 3.12
- OpenMetadata version: 1.12.3
Additional context
- This issue can cause downstream scripts/tools to accumulate duplicates when paging through fieldQuery results.
- Observed behavior in code path suggests from/size may not be propagated through /search/fieldQuery into the underlying search request.
- Happy to provide raw response payloads if needed.
Hi team, I’d like to work on this issue. Could you please assign #27549 to @harishkotra? Thanks!
Hey team,
Thanks for fixing this in https://github.com/open-metadata/OpenMetadata/pull/27590
Are there any plans to backport this into a 1.12.x release? Still seeing the issue in 1.12.10.
Thanks