Hi Matthew, If you run your query on the following document …
<data> <element><id>123</id></element> <element><id>456</id></element> </data> … and if you look into the Info View in the GUI, you will notice that the index will be utilized: Optimized Query: db:text("data", "DatabaseName")/parent::id/parent::element The query optimizer detects that all “data/element/id” elements are leaf elements (i.e., have a single text child node), and the resulting query will be rewritten for index. Maybe there are “id” elements in your document that are no leaf elements? Could you share the result of the following query with us? index:facets('data')/*/element[@name='data']/element[@name='element']/element[@name='id'] Best, Christian