Package org.exist.storage

Examples of org.exist.storage.NativeValueIndex$QNamePrefixValue


        final AtomicValue comparisonCriterium = args[1].itemAt(0).atomize();
       
        Sequence result = Sequence.EMPTY_SEQUENCE;

        if (comparisonCriterium instanceof Indexable) {
            final NativeValueIndex valueIndex = context.getBroker().getValueIndex();
            result =
                valueIndex.find(context.getWatchDog(), Constants.EQ, contextSequence.getDocumentSet(), null, NodeSet.ANCESTOR,
            qname, comparisonCriterium);
        } else {
            final String message = "The comparison criterium must be an Indexable: " +
              "boolean, numeric, string; instead your criterium has type " +
              Type.getTypeName(comparisonCriterium.getType());
View Full Code Here


                {result = evalFallback(nodes, pattern, flags, indexType);}

            if (result == null) {
                final DocumentSet docs = nodes.getDocumentSet();
                try {
                    final NativeValueIndex index = context.getBroker().getValueIndex();
                    hasUsedIndex = true;
                    //TODO : check index' case compatibility with flags' one ? -pb
                    if (context.isProfilingEnabled())
                        {context.getProfiler().message(this, Profiler.OPTIMIZATIONS, "Using vlaue index '" + index.toString() + "'", "Regex: " + pattern);}
                    if (LOG.isTraceEnabled())
                        {LOG.trace("Using range index for fn:matches expression: " + pattern);}
                    if (indexScan)
                        {result = index.matchAll(context.getWatchDog(), docs, nodes, NodeSet.ANCESTOR, pattern, DBBroker.MATCH_REGEXP, flags, caseSensitive);}
                    else
                        {result = index.match(context.getWatchDog(), docs, nodes, NodeSet.ANCESTOR, pattern, contextQName, DBBroker.MATCH_REGEXP, flags, caseSensitive);}
                } catch (final EXistException e) {
                    throw new XPathException(this, e);
                }
            }
        } else {
View Full Code Here

    final AtomicValue comparison = new AnyURIValue(attributeValue);

    final DocumentSet documentSet = getPolicyDocuments(broker, true);
    final NodeSet nodeSet = documentSet.docsToNodeSet();

        final NativeValueIndex valueIndex = broker.getValueIndex();
        final Sequence results = valueIndex.find(null, Constants.EQ, documentSet, null, NodeSet.ANCESTOR, attributeQName, comparison);
//        Sequence results = index.findByQName(attributeQName, comparison, nodeSet);
    //TODO : should we honour (# exist:force-index-use #) ?

    return (results == null) ? null : results.getDocumentSet();
  }
View Full Code Here

TOP

Related Classes of org.exist.storage.NativeValueIndex$QNamePrefixValue

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.