[ 
https://issues.apache.org/jira/browse/JCR-1064?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12523020
 ] 

Marcel Reutegger commented on JCR-1064:
---------------------------------------

Just a couple of minor issues that need to be resolved first:

- Please consistently use spaces and not tabs in the patch
- There's a System.out in SearchIndex.doInit()
- Please wrap the block with the version check into a try/finally and close the 
index reader in the finally block
- Please change !(indexFormatVersion == IndexFormatVersion.V2) to 
indexFormatVersion != IndexFormatVersion.V2

There actually is an issue when the parent handler uses a different index 
format version. If the parent handler (system index) uses the V1 and this 
handler (workspace index) uses V2 the query will use the PROPERTIES_SET field, 
which is not available in the system index.

A user may do the following:
- Upgrate a pre 1.4 repository (-> all indexes are V1)
- Re-index a workspace (-> workspace index will be V2)
- Execute a query on the workspace (-> will use V2 for queries)

This means if a query handler has a parent handler it must not use a more 
recent version than the one its parent is using!

> Optimize queries that check for the existence of a property
> -----------------------------------------------------------
>
>                 Key: JCR-1064
>                 URL: https://issues.apache.org/jira/browse/JCR-1064
>             Project: Jackrabbit
>          Issue Type: Improvement
>          Components: indexing
>    Affects Versions: 1.3.1
>            Reporter: Ard Schrijvers
>            Priority: Minor
>             Fix For: 1.4
>
>         Attachments: JCR-1064-2.patch, JCR-1064-2.patch, JCR-1064-DEPR.patch
>
>
> //[EMAIL PROTECTED] is transformed into the 
> org.apache.jackrabbit.core.query.lucene.MatchAllQuery, that through the 
> MatchAllWeight uses the MatchAllScorer.  The calculateDocFilter() in 
> MatchAllScorer  does not scale and becomes slow for growing number of nodes. 
> Solution: lucene documents will get a new Field:
> public static final String PROPERTIES_SET = "_:PROPERTIES_SET".intern();
> that holds the available properties of this document. 
> NOTE: Lucene indices build without this performance improvement should still 
> work and fall back to the original implementation

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.

Reply via email to