# Filtering and sorting by custom Object Definition fields via /o/search/v1.0/search

**URL:** <https://discuss.liferay.com/t/filtering-and-sorting-by-custom-object-definition-fields-via-o-search-v1-0-search/727>\
**Category:** Headless\
**Tags:** search\
**Created:** [June 16, 2026, 11:09pm UTC](https://discuss.liferay.com/t/filtering-and-sorting-by-custom-object-definition-fields-via-o-search-v1-0-search/727 "2026-06-16T23:09:34Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![YieudaLaurentBako](https://avatars.discourse-cdn.com/v4/letter/y/ba9def/32.png) [@YieudaLaurentBako](https://discuss.liferay.com/u/YieudaLaurentBako)\
**Post date:** [June 16, 2026, 11:09pm UTC](https://discuss.liferay.com/t/filtering-and-sorting-by-custom-object-definition-fields-via-o-search-v1-0-search/727/1 "2026-06-16T23:09:34Z")

</div>

Hi everyone,

I’m building a client extension that uses `/o/search/v1.0/search` to fetch entries from a site scoped custom Object Definition across all scopes. Pagination and global keyword search work perfectly fine.

I am also able to filter and sort by standard system properties like `dateCreated`, `dateModified`, and `title` without any issues. However, I’m stuck when trying to filter or sort by the specific custom fields belonging to my Object Definition (for example, a `lastName` field). Whenever I attempt to pass a custom field name into the REST sort parameter, it returns an `InvalidSortException`.

My questions for the community:

1. Is there any supported syntax or workaround to sort or filter by a custom Object Definition field via `/o/search/v1.0/search`

2. Is there an alternative out-of-the-box headless endpoint (other than the site-scoped `/o/c/{objectname}/scopes/{siteId}`) that supports company-wide / cross-scope queries while allowing OData filtering and sorting on custom object fields?

Any pointers, documentation, or workarounds would be highly appreciated. Thanks!
