[jira] [Commented] (OAK-9341) Unversioned index is getting used even if it doesn't have mutable content index data

2021-01-29 Thread Thomas Mueller (Jira)


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

Thomas Mueller commented on OAK-9341:
-

Yes, I could confirm this using the query:
{noformat}
/jcr:root/oak:index//element(*, oak:QueryIndexDefinition)[@type='lucene'] 
option(index name test)
{noformat}
and the index
{noformat}
"/oak:index/test": {
"compatVersion": 2,
"type": "lucene",
"async": "async",
"includedPaths": ["/oak:index"],
"jcr:primaryType": "oak:QueryIndexDefinition",
"indexRules": {
  "oak:QueryIndexDefinition": {
"properties": {
  "type": {
"name": "type",
"propertyIndex": true,
  }
}
  }
}
  }
{noformat}

> Unversioned index is getting used even if it doesn't have mutable content 
> index data
> 
>
> Key: OAK-9341
> URL: https://issues.apache.org/jira/browse/OAK-9341
> Project: Jackrabbit Oak
>  Issue Type: Bug
>  Components: indexing
>Reporter: Amrit Verma
>Priority: Major
>
> While using a composite node store, if an index doesn't specify a version in 
> its name e.g. {{/oak:index/lucene}} it gets considered for use in a query 
> even if it doesn't have the oak mount index data.
> This the probably due to the reason that `isIndexActive` check is only 
> performed for the versioned indices here - 
> https://github.com/apache/jackrabbit-oak/blob/08c7b20e0676739d9c445b5249c3f71004b6b894/oak-search/src/main/java/org/apache/jackrabbit/oak/plugins/index/search/spi/query/IndexName.java#L208-L215



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


[jira] [Commented] (OAK-9341) Unversioned index is getting used even if it doesn't have mutable content index data

2021-01-29 Thread Thomas Mueller (Jira)


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

Thomas Mueller commented on OAK-9341:
-

Please note it's a big dangerous now to change the behavior... we might break 
existing indexes if we do.

> Unversioned index is getting used even if it doesn't have mutable content 
> index data
> 
>
> Key: OAK-9341
> URL: https://issues.apache.org/jira/browse/OAK-9341
> Project: Jackrabbit Oak
>  Issue Type: Bug
>  Components: indexing
>Reporter: Amrit Verma
>Priority: Major
>
> While using a composite node store, if an index doesn't specify a version in 
> its name e.g. {{/oak:index/lucene}} it gets considered for use in a query 
> even if it doesn't have the oak mount index data.
> This the probably due to the reason that `isIndexActive` check is only 
> performed for the versioned indices here - 
> https://github.com/apache/jackrabbit-oak/blob/08c7b20e0676739d9c445b5249c3f71004b6b894/oak-search/src/main/java/org/apache/jackrabbit/oak/plugins/index/search/spi/query/IndexName.java#L208-L215



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