Have you applied any custom mappings to the index that you're querying? If not, Elasticsearch will apply a dynamic mapping, in which a field like __path will be analyzed. This means that by default the value of __path will be broken up on the slashes in that field, so you can search for the individual parts he, taxonomy_term, access_types and 721.
However, if you use a term query, then that query string is not analyzed. Elasticsearch will try to find a document that contains a __path field with the exact value he/taxonomy_term/access_types/721, which it won't, because for your document that value was chopped up.
Luckily there is a solution here. By default, Elasticsearch will create a second field that you can query, when you index a string field: in your case named __path.keyword. This value contains the exact original string, without any text analysis applied to it. If you are going with the default mappings in Elasticsearch, you will want to query that field instead:
Apache, Apache Lucene, Apache Hadoop, Hadoop, HDFS and the yellow elephant
logo are trademarks of the
Apache Software Foundation
in the United States and/or other countries.