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

Thomas Mueller commented on OAK-12171:
--------------------------------------

FT_OAK-12171 to disable

> Cost estimation for "is (not) null" checks are wrong
> ----------------------------------------------------
>
>                 Key: OAK-12171
>                 URL: https://issues.apache.org/jira/browse/OAK-12171
>             Project: Jackrabbit Oak
>          Issue Type: Improvement
>          Components: indexing
>            Reporter: Thomas Mueller
>            Assignee: Thomas Mueller
>            Priority: Major
>             Fix For: 2.0.0
>
>
> For this index and queries, the cost estimation of Lucene indexes is almost 
> the same no matter if the null check is used or not. The cost estimation also 
> ignores the weight. This should not be the case.
> {noformat}
> {
>     "custom.test": {
>         "async": [ "async", "nrt" ],
>         "compatVersion": 2,
>         "evaluatePathRestrictions": true,
>         "includedPaths": [ "/content" ],
>         "jcr:primaryType": "oak:QueryIndexDefinition",
>         "queryPaths": [ "/content" ],
>         "selectionPolicy": "tag",
>         "tags": [ "abc" ],
>         "type": "lucene",
>         "indexRules": {
>             "nt:unstructured": {
>                 "properties": {
>                     "test": {
>                         "nullCheckEnabled": true,
>                         "name": "updated",
>                         "weight": 10000,
>                         "propertyIndex": true
>                     }
>                 }
>             }
>         }
>     }
> }
> /jcr:root/content//element(*, nt:unstructured)[fn:name() = 'test' and 
> not(@updated)] option (index tag abc)
> cost for [/oak:index/custom.test-1-custom-8] of type (lucene-property) with 
> plan [lucene:custom.test-1-custom-8
>     indexDefinition: /oak:index/custom.test-1-custom-8
>     estimatedEntries: 102
>     luceneQuery: +:ancestors:/content +:nullProps:updated
> ] is 103.00
> /jcr:root/content//element(*, nt:unstructured)[fn:name() = 'test'] option 
> (index tag abc)
> cost for [/oak:index/custom.test-1-custom-8] of type (lucene-property) with 
> plan [lucene:custom.test-1-custom-8
>     indexDefinition: /oak:index/custom.test-1-custom-8
>     estimatedEntries: 103
>     luceneQuery: :ancestors:/content
> ] is 104.00
> {noformat}



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

Reply via email to