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 "Amit Jain (JIRA)" <ji...@apache.org> on 2014/11/12 06:20:33 UTC

[jira] [Updated] (OAK-2190) Support for like query for string

     [ https://issues.apache.org/jira/browse/OAK-2190?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Amit Jain updated OAK-2190:
---------------------------
    Attachment: OAK-2190-Like.patch

The conversion to range is only done (or succeeds) for trailing wildcard searches like foo% which works with lucene property indexes.
With the small addition in [^OAK-2190-Like.patch], the rest of the cases - %foo and %foo% are passed as like and all the tests pass including {{LucenePropertyIndexTest#likeQueriesWithString}}.

But there is a problem with the range conversion for cases - like ab%d. Here the range obtained is {{(ab to ac)}} which would also return for e.g. abe, abae which it should not.
Also, with the conversion to range removed and just passing the like parameter all tests pass.

So, is not having range a problem for property/ordered indexes?


> Support for like query for string
> ---------------------------------
>
>                 Key: OAK-2190
>                 URL: https://issues.apache.org/jira/browse/OAK-2190
>             Project: Jackrabbit Oak
>          Issue Type: Improvement
>          Components: oak-lucene
>            Reporter: Chetan Mehrotra
>            Priority: Minor
>             Fix For: 1.0.9, 1.2
>
>         Attachments: OAK-2190-Like.patch, OAK-2190.patch
>
>
> Lucene property index should support {{LIKE}} operation. So a query like
> bq. select [jcr:path] from [nt:base] where propa like 'hum%'
> Should be implemented in terms of prefix query



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)