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

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

Ard, thanks a lot for the patch, good work.

Here are some more comments:

- Instead of the boolean value newIndexFormat I would rather prefer version 
constants. something like:

public final class IndexVersion {

    public static final IndexVersion V1 = new IndexVersion("1");

    public static final IndexVersion V2 = new IndexVersion("2");

    private final String info;

    private IndexVersion(String info) {
        this.info = info;
    }

    public String getInfo() {
        return info;
    }
}

- SearchIndex.getIndexReader() always returns a new reader instance. That means 
you have to close the returned reader when you are done checking the index 
version.


> 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.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