You are viewing a plain text version of this content. The canonical link for it is here.
Posted to oak-issues@jackrabbit.apache.org by "Vikas Saurabh (JIRA)" <ji...@apache.org> on 2018/12/06 22:09:00 UTC
[jira] [Created] (OAK-7949) Support IN clause for jcr:path sent
down to index (if supported)
Vikas Saurabh created OAK-7949:
----------------------------------
Summary: Support IN clause for jcr:path sent down to index (if supported)
Key: OAK-7949
URL: https://issues.apache.org/jira/browse/OAK-7949
Project: Jackrabbit Oak
Issue Type: Improvement
Components: lucene
Reporter: Vikas Saurabh
Assignee: Vikas Saurabh
There are times where we would want to run a query with some constraints (maybe fulltext) and that the result set is a subset of a set of paths.
To elaborate in terms of queries:
{noformat}
/jcr:root//*[(jcr:path='/parent1/par2/a' or jcr:path='/parent1/par3/b') and jcr:contains(., 'foo')]
{noformat}
OR
{noformat}
SELECT * FROM [nt:base] WHERE ([jcr:path] = '/parent1/par2/a' OR [jcr:path] = '/parent1/par3/b') AND CONTAINS(*, 'foo')
{noformat}
OR
{noformat}
SELECT * FROM [nt:base] WHERE [jcr:path] IN ('/parent1/par2/a', '/parent1/par3/b') AND CONTAINS(*, 'foo')
{noformat}
Currently, single path constraints using {{jcr:path}} (as above) or {{ISSAMENODE}} constraints get planned by lucene index planner and are translated well as a constraint on {{:path}} for lucene query. But, multiple paths don't get the same behavior.
In absence of this issue the output of index could be much larger only to be filtered out at query engine level.
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)