jackrabbit-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Ard Schrijvers (JIRA)" <j...@apache.org>
Subject [jira] Commented: (JCR-1064) Optimize queries that check for the existence of a property
Date Thu, 23 Aug 2007 10:42:31 GMT

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

Ard Schrijvers commented on JCR-1064:
-------------------------------------

According the thread in [1], we have chosen to implement the backwards compatibility by a
check at startup wether the index is in old or new format:

Christoph: boolean propertySetSupported = index.getIndexReader().getFieldNames(
     FieldOption.ALL).contains(FieldNames.PROPERTIES_SET)
     || index.getIndexReader().numDocs() == 0;

Since I need this boolean value in the nodeIndexer I need this property to be available through
the IndexingConfiguration, since I do not have access to the SearchIndex in the NodeIndexer.
 This means adding a 

void setNewIndexFormat(boolean newIndexFormat); and
boolean getNewIndexFormat(); 

in the lucene/QueryImpl, I need in 

Query query = LuceneQueryBuilder.createQuery(root, session,
                index.getContext().getItemStateManager(), index.getNamespaceMappings(),
                index.getTextAnalyzer(), propReg, index.getSynonymProvider());

to also put in an argument for the indexFormat, to have this format available in LuceneQueryBuilder.
WDOT? 

[1] http://www.mail-archive.com/dev@jackrabbit.apache.org/msg06907.html

> 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
>
>
> //*[@mytext] 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.


Mime
View raw message