Description
With an index definition like below
<fooIndex jcr:primaryType="oak:QueryIndexDefinition" async="async" compatVersion="{Long}2" type="lucene"> <indexRules jcr:primaryType="nt:unstructured"> <nt:base jcr:primaryType="nt:unstructured"> <properties jcr:primaryType="nt:unstructured"> <newImport jcr:primaryType="nt:unstructured" analyzed="{Boolean}true" name="bar" propertyIndex="{Boolean}true" type="String"/> </properties> </nt:base> </indexRules> </fooIndex>
And a query like
select [jcr:path] from [nt:base] where contains('foo', 'abc*')
Previous index gets selected even though it does not index 'bar' property. Infact this index would match any query having different property
Thanks to catholicon for reproducing the issue!