Package org.exist.storage

Examples of org.exist.storage.FulltextIndexSpec


        boolean hasQNameIndex = true;
        for (final Iterator<Collection> i = contextSequence.getCollectionIterator(); i.hasNext(); ) {
            final Collection collection = i.next();
            if (collection.getURI().startsWith(XmldbURI.SYSTEM_COLLECTION_URI))
                {continue;}
            final FulltextIndexSpec config = collection.getFulltextIndexConfiguration(context.getBroker());
            //We have a full-text index
            if (config != null) {
                hasQNameIndex = config.hasQNameIndex(contextQName);
            }
            if (!hasQNameIndex) {
                if (LOG.isTraceEnabled())
                    {LOG.trace("Cannot use index on QName: " + contextQName +
                            ". Collection " + collection.getURI() + " does not define an index");}
View Full Code Here


        boolean hasQNameIndex = true;
        for (final Iterator<Collection> i = contextSequence.getCollectionIterator(); i.hasNext(); ) {
            final Collection collection = i.next();
            if (collection.getURI().equals(XmldbURI.SYSTEM_COLLECTION_URI))
                {continue;}
            final FulltextIndexSpec config = collection.getFulltextIndexConfiguration(context.getBroker());
            //We have a fulltext index
            if (config != null) {
              hasQNameIndex = config.hasQNameIndex(contextQName);
            }
            if (!hasQNameIndex) {
                if (LOG.isTraceEnabled())
                    {LOG.trace("cannot use index on QName: " + contextQName + ". Collection " + collection.getURI() +
                        " does not define an index");}
View Full Code Here

    public StoredNode getReindexRoot(StoredNode node, NodePath path, boolean insert, boolean includeSelf) {
        if (node.getNodeType() == Node.ATTRIBUTE_NODE)
            {return null;}
        final IndexSpec indexConf = node.getDocument().getCollection().getIndexConfiguration(broker);
        if (indexConf != null) {
            final FulltextIndexSpec config = indexConf.getFulltextIndexSpec();
            if (config == null)
                {return null;}
            boolean reindexRequired = false;
            final int len = node.getNodeType() == Node.ELEMENT_NODE && !includeSelf ? path.length() - 1 : path.length();
            for (int i = 0; i < len; i++) {
                final QName qn = path.getComponent(i);
                if (config.hasQNameIndex(qn)) {
                    reindexRequired = true;
                    break;
                }
            }
            if (reindexRequired) {
                StoredNode topMost = null;
                StoredNode currentNode = node;
                while (currentNode != null) {
                    if (config.hasQNameIndex(currentNode.getQName()))
                        {topMost = currentNode;}
                    currentNode = currentNode.getParentStoredNode();
                }
                return topMost;
            }
View Full Code Here

        boolean hasQNameIndex = true;
        for (final Iterator<Collection> i = contextSequence.getCollectionIterator(); i.hasNext(); ) {
            final Collection collection = i.next();
            if (collection.getURI().equals(XmldbURI.SYSTEM_COLLECTION_URI))
                {continue;}
            final FulltextIndexSpec config = collection.getFulltextIndexConfiguration(context.getBroker());
            //We have a fulltext index
            if (config != null) {
              hasQNameIndex = config.hasQNameIndex(contextQName);
            }
            if (!hasQNameIndex) {
                if (LOG.isTraceEnabled())
                    {LOG.trace("cannot use index on QName: " + contextQName + ". Collection " + collection.getURI() +
                        " does not define an index");}
View Full Code Here

        final Set<QName> indexes = new HashSet<QName>();
        for (final Iterator<org.exist.collections.Collection> i = docs.getCollectionIterator(); i.hasNext(); ) {
            final org.exist.collections.Collection collection = i.next();
            final IndexSpec idxConf = collection.getIndexConfiguration(broker);
            if (idxConf != null) {
                final FulltextIndexSpec fIdxConf = idxConf.getFulltextIndexSpec();
                final List<QName> qnames = fIdxConf.getIndexedQNames();
                for (final QName qName : qnames) {
                    indexes.add(qName);
                }
            }
        }
View Full Code Here

TOP

Related Classes of org.exist.storage.FulltextIndexSpec

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.