[jira] [Commented] (OAK-7370) order by jcr:score desc doesn't work across union query created by optimizing OR clauses

2019-11-06 Thread Thomas Mueller (Jira)


[ 
https://issues.apache.org/jira/browse/OAK-7370?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16968356#comment-16968356
 ] 

Thomas Mueller commented on OAK-7370:
-

Thanks [~catholicon]! I removed the fix version.

> order by jcr:score desc doesn't work across union query created by optimizing 
> OR clauses
> 
>
> Key: OAK-7370
> URL: https://issues.apache.org/jira/browse/OAK-7370
> Project: Jackrabbit Oak
>  Issue Type: Bug
>  Components: core
>Reporter: Vikas Saurabh
>Assignee: Thomas Mueller
>Priority: Major
>
> Merging of sub-queries created due to optimizing OR clauses doesn't work for 
> sorting on {{jcr:score}}



--
This message was sent by Atlassian Jira
(v8.3.4#803005)


[jira] [Commented] (OAK-7370) order by jcr:score desc doesn't work across union query created by optimizing OR clauses

2018-04-03 Thread Thomas Mueller (JIRA)

[ 
https://issues.apache.org/jira/browse/OAK-7370?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16423871#comment-16423871
 ] 

Thomas Mueller commented on OAK-7370:
-

With XPath queries that contain "or", it's quite hard to avoid "union". I 
created OAK-7385 for that.

> order by jcr:score desc doesn't work across union query created by optimizing 
> OR clauses
> 
>
> Key: OAK-7370
> URL: https://issues.apache.org/jira/browse/OAK-7370
> Project: Jackrabbit Oak
>  Issue Type: Bug
>  Components: core
>Reporter: Vikas Saurabh
>Assignee: Vikas Saurabh
>Priority: Major
> Fix For: 1.10
>
>
> Merging of sub-queries created due to optimizing OR clauses doesn't work for 
> sorting on {{jcr:score}}



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Commented] (OAK-7370) order by jcr:score desc doesn't work across union query created by optimizing OR clauses

2018-04-03 Thread Thomas Mueller (JIRA)

[ 
https://issues.apache.org/jira/browse/OAK-7370?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16423722#comment-16423722
 ] 

Thomas Mueller commented on OAK-7370:
-

In addition to the above: to ensure the right index is used, it might make 
sense to use "option(index tag ...)" here.

> order by jcr:score desc doesn't work across union query created by optimizing 
> OR clauses
> 
>
> Key: OAK-7370
> URL: https://issues.apache.org/jira/browse/OAK-7370
> Project: Jackrabbit Oak
>  Issue Type: Bug
>  Components: core
>Reporter: Vikas Saurabh
>Assignee: Vikas Saurabh
>Priority: Major
> Fix For: 1.10
>
>
> Merging of sub-queries created due to optimizing OR clauses doesn't work for 
> sorting on {{jcr:score}}



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Commented] (OAK-7370) order by jcr:score desc doesn't work across union query created by optimizing OR clauses

2018-04-03 Thread Thomas Mueller (JIRA)

[ 
https://issues.apache.org/jira/browse/OAK-7370?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16423691#comment-16423691
 ] 

Thomas Mueller commented on OAK-7370:
-

A workaround might be, instead of using "isdescendantnode x or isdescendantnode 
y", use "jcr:path like 'x' or jcr:path like 'y'". Example:

{noformat}
SELECT * FROM [nt:base]
WHERE contains(*, 'text') 
AND (ISDESCENDANTNODE('/content/catalog/x8000') 
  OR ISDESCENDANTNODE('/content/catalog/y-900') ) 
order by [jcr:score] desc
{noformat}

Workaround:

{noformat}
SELECT * FROM [nt:base]
WHERE contains(*, 'text') 
AND ISDESCENDANTNODE('/content/catalog')
AND ([jcr:path] like '/content/catalog/x8000/%' 
  OR [jcr:path] like '/content/catalog/y-900/%') ) 
order by [jcr:score] desc
{noformat}

This will consider using union, but the one has a higher cost, so the non-union 
version is used.

In theory this couls be used: "isdescendantnode common-y-x and 
(isdescendantnode x or isdescendantnode y)", but in reality here the cost of 
the union version would be lower, so that one would be used.


> order by jcr:score desc doesn't work across union query created by optimizing 
> OR clauses
> 
>
> Key: OAK-7370
> URL: https://issues.apache.org/jira/browse/OAK-7370
> Project: Jackrabbit Oak
>  Issue Type: Bug
>  Components: core
>Reporter: Vikas Saurabh
>Assignee: Vikas Saurabh
>Priority: Major
> Fix For: 1.10
>
>
> Merging of sub-queries created due to optimizing OR clauses doesn't work for 
> sorting on {{jcr:score}}



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Commented] (OAK-7370) order by jcr:score desc doesn't work across union query created by optimizing OR clauses

2018-03-21 Thread Vikas Saurabh (JIRA)

[ 
https://issues.apache.org/jira/browse/OAK-7370?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16408891#comment-16408891
 ] 

Vikas Saurabh commented on OAK-7370:


Added an ignored lucene based test at 
[r1827451|https://svn.apache.org/r1827451]. Actual issue most likely exists in 
oak-core and hence would call for more tests over there.

> order by jcr:score desc doesn't work across union query created by optimizing 
> OR clauses
> 
>
> Key: OAK-7370
> URL: https://issues.apache.org/jira/browse/OAK-7370
> Project: Jackrabbit Oak
>  Issue Type: Bug
>  Components: core
>Reporter: Vikas Saurabh
>Assignee: Vikas Saurabh
>Priority: Major
> Fix For: 1.10
>
>
> Merging of sub-queries created due to optimizing OR clauses doesn't work for 
> sorting on {{jcr:score}}



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)