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

Thomas Mueller commented on OAK-3591:
-------------------------------------

[~chetanm] it is not clear to me if this is just a documentation issue or if it 
is really a bug, I will try to contact you next week.

> Setting just "analyzed" enable fulltext query against that specific property 
> "jcr:contains(@xyz, '1234')"

Yes, and if that's the case, then the index shouldn't be used for queries of 
type "contains(., '1234')", this is what the bug is about: the index _is_ used 
for such queries, and so the query doesn't return any nodes. The query does 
return the nodes if the index is disabled.

The existence of an index should only affect performance, not the result.

The documentation of "fulltextEnabled", "analyzed" and "nodeScopeIndex" is not 
clear to me. We might want to document "fulltextEnabled", which is used in the 
code but not yet [on the web 
site|http://jackrabbit.apache.org/oak/docs/query/lucene.html]. In the code, it 
is currently documented to be "true by default", but in fact that's not really 
the case either, it seems to be disabled if there are only property indexes and 
none of them have "analyzed" set.

So, not sure yet what is the best fix.


> Lucene index with 'analyzed=true' sometimes used by mistake
> -----------------------------------------------------------
>
>                 Key: OAK-3591
>                 URL: https://issues.apache.org/jira/browse/OAK-3591
>             Project: Jackrabbit Oak
>          Issue Type: Bug
>          Components: lucene, query
>            Reporter: Thomas Mueller
>            Assignee: Thomas Mueller
>             Fix For: 1.3.11
>
>
> A Lucene index with a property that is configured as "analyzed = true" is 
> sometimes used by mistake. Example:
> {noformat}
> oak:index/testLuceneIndex (oak:QueryIndexDefinition)
>   compatVersion: 2
>   type: lucene
>   async: "async"
>   indexRules (nt:unstructured)
>     nt:base (nt:unstructured)
>       properties (nt:unstructured)
>         xyz (nt:unstructured)
>           propertyIndex: true,
>           analyzed: true,
>           name: xyz
> query:
> /jcr:root/content//*[jcr:contains(., '1234')]
> {noformat}
> The index is used, but the result does not contain nodes with properties abc 
> = '1234'.



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

Reply via email to