How can I find nodes based on a field value of an ancestor?

There is no way to build a search that is able to read the fields of an ancestor node. But, using title expressions, you can grab the field value of an ancestor node and have it part of the title of the node you're running the search on, making that information searchable.

TLDR: Use the ${sys:owner} title expression to pick up content from ancestor nodes and their fields.

This solution is great for Readwise users and came about when Maggie from the community wanted to search her Readwise highlights by the tags of the article/book it was taken from.

To do this, use ${sys:owner.Field}, and repeat sys:owner as many levels up as you need to go to target the right ancestor. In the case of Readwise highlights, you usually need to go up two levels. Check out the demo video:

Now with the information you need from the ancestor node baked into the title of the highlight itself, it can be used to search and filter those nodes.

While this solution came up in the context of the Readwise integration, it is a reusable pattern that can be applied elsewhere.