Package org.apache.xindice.core.indexer

Examples of org.apache.xindice.core.indexer.IndexPattern


                // TODO: Add logic to use an EmptyKeySet if a name doesn't already
                //       exist in the SymbolTable.  This will eliminate the need
                //       to do a collection scan in those cases where somebody
                //       typed an element or attribute name incorrectly.

                IndexPattern pattern = iq.getPattern();

                Indexer idx = context.getIndexManager().getBestIndexer(Indexer.STYLE_NODEVALUE, pattern);
        if (idx != null) {
                    return new NamedKeys(nk.name, nk.attribute, QueryEngine.getUniqueKeys(idx.queryMatches(iq)));
                } else if (autoIndex) {
View Full Code Here


            } else {
                ps = nk.name;
            }

            IndexQuery iq;
            IndexPattern pattern = new IndexPattern(symbols, ps, nsMap);
            String value = obj.str();

            switch (op) {
                case IndexQuery.NEQ:
                    iq = new IndexQueryNEQ(pattern, value);
View Full Code Here

                                set.add(rs.getNextKey());
                            }
                            ks.add(set.toArray(EMPTY_KEYS));
                        } else {
                            // Try to use a NameIndex to resolve the path component
                            IndexPattern pattern = new IndexPattern(symbols, name, nsMap);
                            Indexer idx = context.getIndexManager().getBestIndexer(Indexer.STYLE_NODENAME, pattern);
                            if (idx != null) {
                                IndexMatch[] matches = idx.queryMatches(new IndexQueryANY(pattern));
                                Key[] keys = QueryEngine.getUniqueKeys(matches);
                                ks.add(keys);
View Full Code Here

                            ps = owner + "@" + nk.name;
                        } else {
                            ps = nk.name;
                        }

                        IndexPattern pattern = new IndexPattern(symbols, ps, nsMap);

                        XObject obj = (XObject) s;
                        Value val1 = new Value(obj.str());

                        IndexQuery iq = new IndexQuerySW(pattern, val1);
View Full Code Here

                // TODO: Add logic to use an EmptyKeySet if a name doesn't already
                //       exist in the SymbolTable.  This will eliminate the need
                //       to do a collection scan in those cases where somebody
                //       typed an element or attribute name incorrectly.

                IndexPattern pattern = iq.getPattern();

                Indexer idx = context.getIndexManager().getBestIndexer(Indexer.STYLE_NODEVALUE, pattern);
        if (idx != null) {
                    return new NamedKeys(nk.name, nk.attribute, QueryEngine.getUniqueKeys(idx.queryMatches(iq)));
                } else if (autoIndex) {
View Full Code Here

            }
            return null;
        }

        private Object queryTextIndex(String ps, String query) throws Exception {
            IndexPattern pattern = new IndexPattern(symbols, ps, nsMap);

            // check if there is full text indexer for this collection
            Indexer idx = context.getIndexManager().getBestIndexer(Indexer.STYLE_FULLTEXT, pattern);
            if (idx instanceof LuceneIndexer) {
                LuceneIndexer textInd = ((LuceneIndexer) idx);
View Full Code Here

                } else {
                    ps = nk.name;
                }

                IndexQuery iq;
                IndexPattern pattern = new IndexPattern(symbols, ps, nsMap);
                String value = obj.str();

                switch (op) {
                    case IndexQuery.NEQ:
                        iq = new IndexQueryNEQ(pattern, value);
View Full Code Here

                                set.add(rs.getNextKey());
                            }
                            ks.add(set.toArray(EMPTY_KEYS));
                        } else {
                            // Try to use a NameIndex to resolve the path component
                            IndexPattern pattern = new IndexPattern(symbols, name, nsMap);
                            Indexer idx = context.getIndexManager().getBestIndexer(Indexer.STYLE_NODENAME, pattern);
                            if (idx != null) {
                                IndexMatch[] matches = idx.queryMatches(new IndexQueryANY(pattern));
                                Key[] keys = QueryEngine.getUniqueKeys(matches);
                                ks.add(keys);
View Full Code Here

                        ps = owner + "@" + nk.name;
                    } else {
                        ps = nk.name;
                    }

                    IndexPattern pattern = new IndexPattern(symbols, ps, nsMap);

                    XObject obj = (XObject) s;
                    Value val1 = new Value(obj.str());

                    IndexQuery iq = new IndexQuerySW(pattern, val1);
View Full Code Here

                // TODO: Add logic to use an EmptyKeySet if a name doesn't already
                //       exist in the SymbolTable.  This will eliminate the need
                //       to do a collection scan in those cases where somebody
                //       typed an element or attribute name incorrectly.

                IndexPattern pattern = iq.getPattern();

                Indexer idx = context.getIndexManager().getBestIndexer(Indexer.STYLE_NODEVALUE, pattern);
        if (idx != null) {
                    return new NamedKeys(nk.name, nk.attribute, QueryEngine.getUniqueKeys(idx.queryMatches(iq)));
                } else if (autoIndex) {
View Full Code Here

TOP

Related Classes of org.apache.xindice.core.indexer.IndexPattern

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.