Package org.apache.jackrabbit.oak.plugins.index.solr.configuration

Examples of org.apache.jackrabbit.oak.plugins.index.solr.configuration.OakSolrConfiguration


        return new EmbeddedSolrServer(coreContainer, "oak");
    }


    public static OakSolrConfiguration getTestConfiguration() {
        return new OakSolrConfiguration() {
            @Override
            public String getFieldNameFor(Type<?> propertyType) {
                return null;
            }
View Full Code Here


    }

    @Override
    public OakSolrConfiguration getConfiguration() {
        if (oakSolrConfiguration == null) {
            oakSolrConfiguration = new OakSolrConfiguration() {
                @Override
                public String getFieldNameFor(Type<?> propertyType) {
                    if (Type.BINARIES.equals(propertyType) || Type.BINARY.equals(propertyType)) {
                        // TODO : use Tika / SolrCell here
                        return propertyType.toString()+"_bin";
View Full Code Here

        return new EmbeddedSolrServer(coreContainer, "oak");
    }


    public static OakSolrConfiguration getTestConfiguration() {
        return new OakSolrConfiguration() {
            @Override
            public String getFieldNameFor(Type<?> propertyType) {
                return null;
            }
View Full Code Here

    }

    @Override
    public OakSolrConfiguration getConfiguration() {
        if (oakSolrConfiguration == null) {
            oakSolrConfiguration = new OakSolrConfiguration() {
                @Override
                public String getFieldNameFor(Type<?> propertyType) {
                    if (Type.BINARIES.equals(propertyType) || Type.BINARY.equals(propertyType)) {
                        // TODO : use Tika / SolrCell here
                        return propertyType.toString()+"_bin";
View Full Code Here

            assertTrue(file.delete());
        }
    }

    public static OakSolrConfiguration getTestConfiguration() {
        return new OakSolrConfiguration() {
            @Override
            public String getFieldNameFor(Type<?> propertyType) {
                return null;
            }
View Full Code Here

    }

    @Override
    public OakSolrConfiguration getConfiguration() {
        if (oakSolrConfiguration == null) {
            oakSolrConfiguration = new OakSolrConfiguration() {
                @Override
                public String getFieldNameFor(Type<?> propertyType) {
                    if (Type.BINARIES.equals(propertyType) || Type.BINARY.equals(propertyType)) {
                        // TODO : use Tika / SolrCell here
                        return propertyType.toString()+"_bin";
View Full Code Here

            solrServer.deleteByQuery("*:*");
            solrServer.commit();
        } catch (Exception e) {
            throw new RuntimeException(e);
        }
        OakSolrConfiguration configuration = new DefaultSolrConfiguration() {
            @Override
            public CommitPolicy getCommitPolicy() {
                return CommitPolicy.HARD;
            }
        };
View Full Code Here

    public void testCostWithNoRestrictions() throws Exception {
        NodeState root = mock(NodeState.class);
        SelectorImpl selector = mock(SelectorImpl.class);

        SolrServer solrServer = mock(SolrServer.class);
        OakSolrConfiguration configuration = new DefaultSolrConfiguration();
        SolrQueryIndex solrQueryIndex = new SolrQueryIndex("solr", solrServer, configuration);

        FilterImpl filter = new FilterImpl(selector, "", new QueryEngineSettings());
        double cost = solrQueryIndex.getCost(filter, root);
        assertTrue(Double.POSITIVE_INFINITY == cost);
View Full Code Here

    public void testDefaultCostWithNoRestrictions() throws Exception {
        NodeState root = mock(NodeState.class);
        SelectorImpl selector = mock(SelectorImpl.class);

        SolrServer solrServer = mock(SolrServer.class);
        OakSolrConfiguration configuration = new DefaultSolrConfiguration();
        SolrQueryIndex solrQueryIndex = new SolrQueryIndex("solr", solrServer, configuration);

        FilterImpl filter = new FilterImpl(selector, "", new QueryEngineSettings());
        double cost = solrQueryIndex.getCost(filter, root);
        assertTrue(Double.POSITIVE_INFINITY == cost);
View Full Code Here

        NodeState root = mock(NodeState.class);
        when(root.getNames(any(String.class))).thenReturn(Collections.<String>emptySet());
        SelectorImpl selector = new SelectorImpl(root, "a");

        SolrServer solrServer = mock(SolrServer.class);
        OakSolrConfiguration configuration = new DefaultSolrConfiguration();
        SolrQueryIndex solrQueryIndex = new SolrQueryIndex("solr", solrServer, configuration);

        FilterImpl filter = new FilterImpl(selector, "select * from [nt:base] as a where isdescendantnode(a, '/test')", new QueryEngineSettings());
        filter.restrictPath("/test", Filter.PathRestriction.ALL_CHILDREN);
        double cost = solrQueryIndex.getCost(filter, root);
View Full Code Here

TOP

Related Classes of org.apache.jackrabbit.oak.plugins.index.solr.configuration.OakSolrConfiguration

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.