Structure not only displays hierarchy of items, it allows to search items based on their relative positions in the hierarchy. The language used to express such queries is called Structured JQL or S-JQL (where JQL stands for JIRA Query Language).Structured JQL queries are available in these places:
structure()
JQL function — that allows to search for issues in structure on the Issue Navigator, see structure() JQL function;To quickly find a solution to a common structure querying problem, consult S-JQL Cookbook, which contains a number of examples. To build your own query, start off with the closest example and modify the query as needed.
Consult S-JQL Reference for a comprehensive description of the language and structure()
JQL function.