Package io.crate.operation.predicate

Examples of io.crate.operation.predicate.MatchPredicate.info()


    @Test
    public void testWhereReferenceMatchString() throws Exception {
        FunctionIdent functionIdent = new FunctionIdent(
                MatchPredicate.NAME, ImmutableList.<DataType>of(DataTypes.OBJECT, DataTypes.STRING, DataTypes.STRING, DataTypes.OBJECT));
        MatchPredicate matchImpl = (MatchPredicate)functions.get(functionIdent);
        Function match = new Function(matchImpl.info(),
                Arrays.<Symbol>asList(
                        Literal.newLiteral(
                                new MapBuilder<String, Object>().put(name_ref.info().ident().columnIdent().fqn(), null).map()),
                        Literal.newLiteral("arthur"),
                        Literal.newLiteral(MatchPredicate.DEFAULT_MATCH_TYPE),
View Full Code Here


    @Test
    public void testWhereRerenceMatchStringWithBoost() throws Exception {
        FunctionIdent functionIdent = new FunctionIdent(
                MatchPredicate.NAME, ImmutableList.<DataType>of(DataTypes.OBJECT, DataTypes.STRING, DataTypes.STRING, DataTypes.OBJECT));
        MatchPredicate matchImpl = (MatchPredicate)functions.get(functionIdent);
        Function match = new Function(matchImpl.info(),
                Arrays.<Symbol>asList(
                        Literal.newLiteral(
                                new MapBuilder<String, Object>().put(name_ref.info().ident().columnIdent().fqn(), 0.42f).map()),
                        Literal.newLiteral("trillian"),
                        Literal.newLiteral(MatchPredicate.DEFAULT_MATCH_TYPE),
View Full Code Here

    public void testWhereMultiMatchString() throws Exception {
        FunctionIdent ident = new FunctionIdent(
                MatchPredicate.NAME, ImmutableList.<DataType>of(DataTypes.OBJECT, DataTypes.STRING, DataTypes.STRING, DataTypes.OBJECT)
        );
        MatchPredicate matchImpl = (MatchPredicate)functions.get(ident);
        Function match = new Function(matchImpl.info(),
                Arrays.<Symbol>asList(
                        Literal.newLiteral(
                                new MapBuilder<String, Object>()
                                        .put(name_ref.info().ident().columnIdent().fqn(), null)
                                        .put(extrafield.info().ident().columnIdent().fqn(), 4.5d)
View Full Code Here

    public void testMultiMatchType() throws Exception {
        FunctionIdent ident = new FunctionIdent(
                MatchPredicate.NAME, ImmutableList.<DataType>of(DataTypes.OBJECT, DataTypes.STRING, DataTypes.STRING, DataTypes.OBJECT)
        );
        MatchPredicate matchImpl = (MatchPredicate) functions.get(ident);
        Function match = new Function(matchImpl.info(),
                Arrays.<Symbol>asList(
                        Literal.newLiteral(
                                new MapBuilder<String, Object>()
                                        .put(name_ref.info().ident().columnIdent().fqn(), 0.003d)
                                        .put(nestedField.info().ident().columnIdent().fqn(), null)
View Full Code Here

        FunctionIdent ident = new FunctionIdent(
                MatchPredicate.NAME, ImmutableList.<DataType>of(DataTypes.OBJECT, DataTypes.STRING, DataTypes.STRING, DataTypes.OBJECT)
        );
        MatchPredicate matchImpl = (MatchPredicate) functions.get(ident);
        Function match = new Function(matchImpl.info(),
                Arrays.<Symbol>asList(
                        Literal.newLiteral(
                                new MapBuilder<String, Object>()
                                        .put(name_ref.info().ident().columnIdent().fqn(), 0.003d)
                                        .put(nestedField.info().ident().columnIdent().fqn(), 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.