Examples of IndexDefinition


Examples of com.thinkaurelius.titan.graphdb.types.IndexDefinition

                indexParas = new IndexParameters[indexTypes.length];
                for (int i=0;i<indexTypes.length;i++)
                    indexParas[i]=new IndexParameters(indexTypes[i].getIndexName(),new Parameter[0]);
            }
            Preconditions.checkArgument(indexTypes.length==indexParas.length,"Lengths don't agree: %s vs %s",indexTypes.length,indexParas.length);
            IndexDefinition tmp[] = new IndexDefinition[indexTypes.length];
            for (int i=0;i<indexTypes.length;i++) {
                tmp[i]=IndexDefinition.of(indexTypes[i],indexParas[i]);
            }
            indexes = tmp;
        }
View Full Code Here

Examples of com.thinkaurelius.titan.graphdb.types.IndexDefinition

    }

    public IndexDefinition getIndex(String name, Class<? extends Element> elementType) {
        Preconditions.checkArgument(elementType==Vertex.class || elementType==Edge.class, "Expected Vertex or Edge class as argument");
        for (int i=0;i<getIndexes().length;i++) {
            IndexDefinition def = getIndexes()[i];
            if (def.getElementType()==elementType && def.getIndexName().equals(name)) return def;
        }
        return null;
    }
View Full Code Here

Examples of org.apache.jackrabbit.oak.plugins.index.IndexDefinition

                new OpenSecurityProvider(), new CompositeQueryIndexProvider());
    }

    @Test
    public void testSolrQueryEngine() throws Exception {
        IndexDefinition testID = new IndexDefinitionImpl("solr-test",
                "solr", "/");
        Root root = createRootImpl();
        Tree tree = root.getTree("/");

        tree.addChild("somenode").setProperty("foo", "bar");
View Full Code Here

Examples of org.apache.jackrabbit.oak.plugins.index.IndexDefinition

            }
        };
        EditorHook hook = new EditorHook(provider);
        NodeState indexed = hook.processCommit(before, after);

        IndexDefinition testDef = new IndexDefinitionImpl("solr",
                "solr", "/oak:index/solr");
        QueryIndex queryIndex = new SolrQueryIndex(testDef, server, configuration);
        FilterImpl filter = new FilterImpl(null, null);
        filter.restrictPath("newnode", Filter.PathRestriction.EXACT);
        filter.restrictProperty("prop", Operator.EQUAL,
View Full Code Here

Examples of org.apache.jackrabbit.oak.plugins.index.IndexDefinition

            }
        };
        EditorHook hook = new EditorHook(provider);
        NodeState indexed = hook.processCommit(before, after);

        IndexDefinition testDef = new IndexDefinitionImpl("solr",
                "solr", "/oak:index/solr");
        QueryIndex queryIndex = new SolrQueryIndex(testDef, server, configuration);
        FilterImpl filter = new FilterImpl(null, null);
        filter.restrictProperty("foo", Operator.EQUAL,
                PropertyValues.newString("bar"));
View Full Code Here

Examples of org.apache.jackrabbit.oak.plugins.index.IndexDefinition

            }
        };
        EditorHook hook = new EditorHook(provider);
        NodeState indexed = hook.processCommit(before, after);

        IndexDefinition testDef = new IndexDefinitionImpl("solr",
                "solr", "/oak:index/solr");
        QueryIndex queryIndex = new SolrQueryIndex(testDef, server, configuration);
        FilterImpl filter = new FilterImpl(null, null);
        filter.restrictProperty("foo", Operator.EQUAL,
                PropertyValues.newString("bar"));
View Full Code Here

Examples of org.apache.jackrabbit.oak.plugins.index.IndexDefinition

            }
        };
        EditorHook hook = new EditorHook(provider);
        NodeState indexed = hook.processCommit(before, after);

        IndexDefinition testDef = new IndexDefinitionImpl("solr",
                "solr", "/oak:index/solr");
        QueryIndex queryIndex = new SolrQueryIndex(testDef, server, configuration);
        FilterImpl filter = new FilterImpl(null, null);
        filter.restrictPath("/newnode", Filter.PathRestriction.EXACT);
        filter.restrictProperty("prop", Operator.EQUAL,
View Full Code Here

Examples of org.apache.jackrabbit.oak.plugins.index.IndexDefinition

            }
        };
        EditorHook hook = new EditorHook(provider);
        NodeState indexed = hook.processCommit(before, after);

        IndexDefinition testDef = new IndexDefinitionImpl("solr",
                "solr", "/oak:index/solr");
        QueryIndex queryIndex = new SolrQueryIndex(testDef, server, configuration);
        FilterImpl filter = new FilterImpl(null, null);
        filter.restrictProperty("foo", Operator.EQUAL,
                PropertyValues.newString("bar"));
View Full Code Here

Examples of org.apache.jackrabbit.oak.plugins.index.IndexDefinition

            }
        };
        EditorHook hook = new EditorHook(provider);
        NodeState indexed = hook.processCommit(before, after);

        IndexDefinition testDef = new IndexDefinitionImpl("solr",
                "solr", "/oak:index/solr");
        QueryIndex queryIndex = new SolrQueryIndex(testDef, server, configuration);
        FilterImpl filter = new FilterImpl(null, null);
        filter.restrictProperty("foo", Operator.EQUAL,
                PropertyValues.newString("bar"));
View Full Code Here

Examples of org.apache.jackrabbit.oak.plugins.index.IndexDefinition

            }
        };
        EditorHook hook = new EditorHook(provider);
        NodeState indexed = hook.processCommit(before, after);

        IndexDefinition testDef = new IndexDefinitionImpl("solr",
                "solr", "/oak:index/solr");
        QueryIndex queryIndex = new SolrQueryIndex(testDef, server, configuration);
        FilterImpl filter = new FilterImpl(null, null);
        filter.restrictPath("/a", Filter.PathRestriction.ALL_CHILDREN);
        Cursor cursor = queryIndex.query(filter, indexed);
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.