Examples of FullTextExpression


Examples of org.apache.jackrabbit.oak.query.fulltext.FullTextExpression

    public double getCost(Filter filter, NodeState root) {
        if (!isLive(root)) {
            // unusable index
            return Double.POSITIVE_INFINITY;
        }
        FullTextExpression ft = filter.getFullTextConstraint();
        if (ft == null) {
            // no full-text condition: don't use this index,
            // as there might be a better one
            return Double.POSITIVE_INFINITY;
        }
View Full Code Here

Examples of org.apache.jackrabbit.oak.query.fulltext.FullTextExpression

        return null;
    }

    @Override
    public String getPlan(Filter filter, NodeState root) {
        FullTextExpression ft = filter.getFullTextConstraint();
        Set<String> relPaths = getRelativePaths(ft);
        if (relPaths.size() > 1) {
            return new MultiLuceneIndex(filter, root, relPaths).getPlan();
        }
        String parent = relPaths.size() == 0 ? "" : relPaths.iterator().next();
View Full Code Here

Examples of org.apache.jackrabbit.oak.query.fulltext.FullTextExpression

    @Override
    public Cursor query(Filter filter, NodeState root) {
        if (!isLive(root)) {
            throw new IllegalStateException("Lucene index is not live");
        }
        FullTextExpression ft = filter.getFullTextConstraint();
        Set<String> relPaths = getRelativePaths(ft);
        if (relPaths.size() > 1) {
            return new MultiLuceneIndex(filter, root, relPaths).query();
        }
        String parent = relPaths.size() == 0 ? "" : relPaths.iterator().next();
View Full Code Here

Examples of org.apache.jackrabbit.oak.query.fulltext.FullTextExpression

     * @return the Lucene query
     */
    private static Query getQuery(Filter filter, IndexReader reader,
            boolean nonFullTextConstraints, Analyzer analyzer) {
        List<Query> qs = new ArrayList<Query>();
        FullTextExpression ft = filter.getFullTextConstraint();
        if (ft == null) {
            // there might be no full-text constraint
            // when using the LowCostLuceneIndexProvider
            // which is used for testing
        } else {
View Full Code Here

Examples of org.apache.jackrabbit.oak.query.fulltext.FullTextExpression

        return Sets.intersection(s1, s2);
    }
   
    @Override
    public FullTextExpression getFullTextConstraint(SelectorImpl s) {
        FullTextExpression f1 = constraint1.getFullTextConstraint(s);
        FullTextExpression f2 = constraint2.getFullTextConstraint(s);
        if (f1 == null || f2 == null) {
            // the full-text index can not be used for conditions of the form
            // "contains(a, 'x') or b=123"
            return null;
        }
View Full Code Here

Examples of org.apache.jackrabbit.oak.query.fulltext.FullTextExpression

        // where b.y is null" - in this case the selector b
        // must not use an index condition on "y is null"
        // (".. is null" must be written as "not .. is not null").
        if (queryConstraint != null) {
            queryConstraint.restrict(f);
            FullTextExpression ft = queryConstraint.getFullTextConstraint(this);
            f.setFullTextConstraint(ft);
        }

        return f;
    }
View Full Code Here

Examples of org.apache.jackrabbit.oak.query.fulltext.FullTextExpression

            assertEquals(expectedMessage, msg);
        }
    }
   
    private static String convertPattern(String pattern) throws ParseException {
        FullTextExpression e = FullTextParser.parse(null, pattern);
        return e.toString();
    }
View Full Code Here

Examples of org.apache.jackrabbit.oak.query.fulltext.FullTextExpression

        FullTextExpression e = FullTextParser.parse(null, pattern);
        return e.toString();
    }

    private static boolean test(String pattern, String value) throws ParseException {
        FullTextExpression e = FullTextParser.parse(null, pattern);
        return e.evaluate(value);
    }
View Full Code Here

Examples of org.apache.jackrabbit.oak.query.fulltext.FullTextExpression

        // where b.y is null" - in this case the selector b
        // must not use an index condition on "y is null"
        // (".. is null" must be written as "not .. is not null").
        if (queryConstraint != null) {
            queryConstraint.restrict(f);
            FullTextExpression ft = queryConstraint.getFullTextConstraint(this);
            f.setFullTextConstraint(ft);
        }

        return f;
    }
View Full Code Here

Examples of org.apache.jackrabbit.oak.query.fulltext.FullTextExpression

        return Sets.intersection(s1, s2);
    }
   
    @Override
    public FullTextExpression getFullTextConstraint(SelectorImpl s) {
        FullTextExpression f1 = constraint1.getFullTextConstraint(s);
        FullTextExpression f2 = constraint2.getFullTextConstraint(s);
        if (f1 == null || f2 == null) {
            // the full-text index can not be used for conditions of the form
            // "contains(a, 'x') or b=123"
            return null;
        }
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.