Examples of IndexSpec


Examples of org.exist.storage.IndexSpec

    public void setDocument(DocumentImpl document) {
        isDocumentGMLAware = false;
        documentDeleted= false;
        if (document != null) {
            IndexSpec idxConf = document.getCollection().getIndexConfiguration(getBroker());
            if (idxConf != null) {
                Map collectionConfig = (Map) idxConf.getCustomIndexSpec(AbstractGMLJDBCIndex.ID);
                if (collectionConfig != null) {
                    isDocumentGMLAware = true;
                    if (collectionConfig.get(AbstractGMLJDBCIndex.ID) != null)
                        flushAfter = ((GMLIndexConfig)collectionConfig.get(AbstractGMLJDBCIndex.ID)).getFlushAfter();
                }
View Full Code Here

Examples of org.exist.storage.IndexSpec

            LOG.debug("Dropped " + nodeCount + " nodes from GML index");
    }

    public void removeCollection(Collection collection, DBBroker broker, boolean reindex) {
        boolean isCollectionGMLAware = false;
        IndexSpec idxConf = collection.getIndexConfiguration(broker);
        if (idxConf != null) {
            Map collectionConfig = (Map) idxConf.getCustomIndexSpec(AbstractGMLJDBCIndex.ID);
            isCollectionGMLAware = (collectionConfig != null);
        }
        if (!isCollectionGMLAware)
            return;
View Full Code Here

Examples of org.exist.storage.IndexSpec

        for (final Iterator<Collection> i = contextSequence.getCollectionIterator(); i.hasNext(); ) {
            final Collection collection = i.next();
            if (collection.getURI().startsWith(XmldbURI.SYSTEM_COLLECTION_URI)) {
                continue;
            }
            IndexSpec idxConf = collection.getIndexConfiguration(context.getBroker());
            if (idxConf != null) {
                RangeIndexConfig config = (RangeIndexConfig) idxConf.getCustomIndexSpec(RangeIndex.ID);
                if (config != null) {
                    int type = config.getType(field);
                    if (type != Type.ITEM) {
                        return type;
                    }
View Full Code Here

Examples of org.exist.storage.IndexSpec

    }

    @Override
    public void setDocument(DocumentImpl document, int mode) {
        this.currentDoc = document;
        IndexSpec indexConf = document.getCollection().getIndexConfiguration(broker);
        if (indexConf != null) {
            config = (RangeIndexConfig) indexConf.getCustomIndexSpec(RangeIndex.ID);
            if (config != null)
                // Create a copy of the original RangeIndexConfig (there's only one per db instance),
                // so we can safely work with it.
                config = new RangeIndexConfig(config);
        }
View Full Code Here

Examples of org.exist.storage.IndexSpec

     * or qname should be specified.
     */
    private Analyzer getAnalyzer(QName qname, String fieldName, DocumentSet docs) {
        for (Iterator<Collection> i = docs.getCollectionIterator(); i.hasNext(); ) {
            Collection collection = i.next();
            IndexSpec idxConf = collection.getIndexConfiguration(broker);
            if (idxConf != null) {
                RangeIndexConfig config = (RangeIndexConfig) idxConf.getCustomIndexSpec(RangeIndex.ID);
                if (config != null) {
                    Analyzer analyzer = config.getAnalyzer(qname, fieldName);
                    if (analyzer != null)
                        return analyzer;
                }
View Full Code Here

Examples of org.exist.storage.IndexSpec

     * or qname should be specified.
     */
    private boolean isCaseSensitive(QName qname, String fieldName, DocumentSet docs) {
        for (Iterator<Collection> i = docs.getCollectionIterator(); i.hasNext(); ) {
            Collection collection = i.next();
            IndexSpec idxConf = collection.getIndexConfiguration(broker);
            if (idxConf != null) {
                RangeIndexConfig config = (RangeIndexConfig) idxConf.getCustomIndexSpec(RangeIndex.ID);
                if (config != null && !config.isCaseSensitive(qname, fieldName)) {
                    return false;
                }
            }
        }
View Full Code Here

Examples of org.exist.storage.IndexSpec

     */
    private List<QName> getDefinedIndexes(DBBroker broker, DocumentSet docs) {
        List<QName> indexes = new ArrayList<QName>(20);
        for (Iterator<Collection> i = docs.getCollectionIterator(); i.hasNext(); ) {
            Collection collection = i.next();
            IndexSpec idxConf = collection.getIndexConfiguration(broker);
            if (idxConf != null) {
                Map<?,?> config = (Map<?,?>) idxConf.getCustomIndexSpec(NGramIndex.ID);
                if (config != null) {
                    for (Object name : config.keySet()) {
                        QName qn = (QName) name;
                        indexes.add(qn);
                    }
View Full Code Here

Examples of org.exist.storage.IndexSpec

    @Override
    public StoredNode getReindexRoot(StoredNode node, NodePath path, boolean insert, boolean includeSelf) {
        if (node.getNodeType() == Node.ATTRIBUTE_NODE)
            return null;
        IndexSpec indexConf = node.getDocument().getCollection().getIndexConfiguration(broker);
        if (indexConf != null) {
            Map<?,?> config = (Map<?,?>) indexConf.getCustomIndexSpec(NGramIndex.ID);
            if (config == null)
                return null;
            boolean reindexRequired = false;
            int len = node.getNodeType() == Node.ELEMENT_NODE && !includeSelf ? path.length() - 1 : path.length();
            for (int i = 0; i < len; i++) {
View Full Code Here

Examples of org.exist.storage.IndexSpec

    @Override
    public void setDocument(DocumentImpl document, int newMode) {
      currentDoc = document;
        //config = null;
        contentStack = null;
        IndexSpec indexConf = document.getCollection().getIndexConfiguration(broker);
        if (indexConf != null)
            config = (Map<QName, ?>) indexConf.getCustomIndexSpec(org.exist.indexing.ngram.NGramIndex.ID);
        mode = newMode;
    }
View Full Code Here

Examples of org.exist.storage.IndexSpec

    }

    public void setDocument(DocumentImpl doc, int newMode) {
        document = doc;
        mode = newMode;
        final IndexSpec indexConf = document.getCollection().getIndexConfiguration(broker);
        if (indexConf != null)
            {config = indexConf.getFulltextIndexSpec();}
        engine.setDocument(document);
    }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.