[jira] [Updated] (OAK-3574) Query engine: support p=lowercase('x') and other function-based indexes
[ https://issues.apache.org/jira/browse/OAK-3574?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Julian Reschke updated OAK-3574: Fix Version/s: 1.6 > Query engine: support p=lowercase('x') and other function-based indexes > --- > > Key: OAK-3574 > URL: https://issues.apache.org/jira/browse/OAK-3574 > Project: Jackrabbit Oak > Issue Type: New Feature > Components: core, lucene, query >Reporter: Thomas Mueller >Assignee: Thomas Mueller > Fix For: 1.6, 1.5.11 > > Attachments: OAK-3574-lucene-2.patch, OAK-3574-lucene.patch > > > Currently, the query engine and indexes don't support function-based indexes > for conditions of the form lowercase(property) = 'x'. This needs to be > supported, specially for the Lucene property index. > Also important is lowercase(name()). -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Updated] (OAK-3574) Query engine: support p=lowercase('x') and other function-based indexes
[ https://issues.apache.org/jira/browse/OAK-3574?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Thomas Mueller updated OAK-3574: Component/s: lucene > Query engine: support p=lowercase('x') and other function-based indexes > --- > > Key: OAK-3574 > URL: https://issues.apache.org/jira/browse/OAK-3574 > Project: Jackrabbit Oak > Issue Type: New Feature > Components: core, lucene, query >Reporter: Thomas Mueller >Assignee: Thomas Mueller > Fix For: 1.5.11 > > Attachments: OAK-3574-lucene-2.patch, OAK-3574-lucene.patch > > > Currently, the query engine and indexes don't support function-based indexes > for conditions of the form lowercase(property) = 'x'. This needs to be > supported, specially for the Lucene property index. > Also important is lowercase(name()). -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Updated] (OAK-3574) Query engine: support p=lowercase('x') and other function-based indexes
[ https://issues.apache.org/jira/browse/OAK-3574?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Thomas Mueller updated OAK-3574: Fix Version/s: 1.5.11 > Query engine: support p=lowercase('x') and other function-based indexes > --- > > Key: OAK-3574 > URL: https://issues.apache.org/jira/browse/OAK-3574 > Project: Jackrabbit Oak > Issue Type: New Feature > Components: core, lucene, query >Reporter: Thomas Mueller >Assignee: Thomas Mueller > Fix For: 1.5.11 > > Attachments: OAK-3574-lucene-2.patch, OAK-3574-lucene.patch > > > Currently, the query engine and indexes don't support function-based indexes > for conditions of the form lowercase(property) = 'x'. This needs to be > supported, specially for the Lucene property index. > Also important is lowercase(name()). -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Updated] (OAK-3574) Query engine: support p=lowercase('x') and other function-based indexes
[ https://issues.apache.org/jira/browse/OAK-3574?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Thomas Mueller updated OAK-3574: Attachment: OAK-3574-lucene-2.patch New patch with fixed issues. The code processing functions should now be a bit more encapsulated and easier to re-use (class FunctionIndexProcessor). Processing now uses a simple stack machine, so it should be easier to extend. [~chetanm] could you review again please? > Query engine: support p=lowercase('x') and other function-based indexes > --- > > Key: OAK-3574 > URL: https://issues.apache.org/jira/browse/OAK-3574 > Project: Jackrabbit Oak > Issue Type: New Feature > Components: core, query >Reporter: Thomas Mueller >Assignee: Thomas Mueller > Attachments: OAK-3574-lucene-2.patch, OAK-3574-lucene.patch > > > Currently, the query engine and indexes don't support function-based indexes > for conditions of the form lowercase(property) = 'x'. This needs to be > supported, specially for the Lucene property index. > Also important is lowercase(name()). -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Updated] (OAK-3574) Query engine: support p=lowercase('x') and other function-based indexes
[ https://issues.apache.org/jira/browse/OAK-3574?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Thomas Mueller updated OAK-3574: Attachment: OAK-3574-lucene.patch OAK-3574-lucene.patch: patch for the Lucene index to support function based indexes. Tests: there are new test for this feature, and changes to integration test. For existing integration tests, the relevant function-based indexes are created. If an integration test uses a function restriction that is not indexes, the test fails because the index runs in "test mode". Index configuration: similar to indexing a property. For the condition (XPath) "fn:upper-case(@lastName) = 'x'", create a new node under the relevant Lucene index (compatVersion 2), as follows. To use it for "order by fn:upper-case(@lastName)", use "ordered": {noformat} /oak:index/assetType + indexRules + nt:base + properties + upperLastName - function = "fn:upper-case(@lastName)" - ordered = true {noformat} The syntax of the "function" property is similar to the relevant condition in the query. Both XPath and SQL are supported (even thought I would probably use XPath in practise). Examples for property "function": * fn:upper-case(@data) * fn:lower-case(test/@data) * fn:lower-case(fn:name()) * fn:lower-case(fn:name()) * fn:lower-case(fn:local-name()) * fn:string-length(test/@data) * upper(\[data\]) * lower(\[test/data\]) * lower(name()) * lower(localname()) * length(\[test/data\]) * length(name()) Indexing multi-valued properties are supported. Relative properties are supported (except for ".." and "."). Range conditions are supported ('>', '>=', '<=', '<'). [~chetanm] could you please review the patch? > Query engine: support p=lowercase('x') and other function-based indexes > --- > > Key: OAK-3574 > URL: https://issues.apache.org/jira/browse/OAK-3574 > Project: Jackrabbit Oak > Issue Type: New Feature > Components: core, query >Reporter: Thomas Mueller >Assignee: Thomas Mueller > Attachments: OAK-3574-lucene.patch > > > Currently, the query engine and indexes don't support function-based indexes > for conditions of the form lowercase(property) = 'x'. This needs to be > supported, specially for the Lucene property index. > Also important is lowercase(name()). -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Updated] (OAK-3574) Query engine: support p=lowercase('x') and other function-based indexes
[ https://issues.apache.org/jira/browse/OAK-3574?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Thomas Mueller updated OAK-3574: Description: Currently, the query engine and indexes don't support function-based indexes for conditions of the form lowercase(property) = 'x'. This needs to be supported, specially for the Lucene property index. Also important is lowercase(name()). was:Currently, the query engine and indexes don't support function-based indexes for conditions of the form lowercase(property) = 'x'. This needs to be supported, specially for the Lucene property index. > Query engine: support p=lowercase('x') and other function-based indexes > --- > > Key: OAK-3574 > URL: https://issues.apache.org/jira/browse/OAK-3574 > Project: Jackrabbit Oak > Issue Type: New Feature > Components: core, query >Reporter: Thomas Mueller >Assignee: Thomas Mueller > > Currently, the query engine and indexes don't support function-based indexes > for conditions of the form lowercase(property) = 'x'. This needs to be > supported, specially for the Lucene property index. > Also important is lowercase(name()). -- This message was sent by Atlassian JIRA (v6.3.4#6332)