All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.github.wz2cool.elasticsearch.query.builder.RegexpExtQueryBuilder Maven / Gradle / Ivy

There is a newer version: 0.1.6
Show newest version
package com.github.wz2cool.elasticsearch.query.builder;

import com.github.wz2cool.elasticsearch.lambda.GetStringPropertyFunction;
import com.github.wz2cool.elasticsearch.model.ColumnInfo;
import org.elasticsearch.index.query.QueryBuilder;
import org.elasticsearch.index.query.RegexpQueryBuilder;

/**
 * @see RegexpQueryBuilder
 */
public class RegexpExtQueryBuilder implements ExtQueryBuilder {

    private final RegexpQueryBuilder regexpQueryBuilder;

    /**
     * @see RegexpQueryBuilder#RegexpQueryBuilder(String, String)
     */
    public RegexpExtQueryBuilder(GetStringPropertyFunction getPropertyFunc, String regexp) {
        final ColumnInfo columnInfo = getColumnInfo(getPropertyFunc);
        this.regexpQueryBuilder = new RegexpQueryBuilder(columnInfo.getColumnName(), regexp);
    }

    @Override
    public QueryBuilder build() {
        return this.regexpQueryBuilder;
    }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy